summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2016-03-29 01:36:01 +0000
committerHal Finkel <hfinkel@anl.gov>2016-03-29 01:36:01 +0000
commitfa7057a415d5de8bec0063b2e9c96836c08468ab (patch)
treef4059fd8b058380a901d047a9d53260025550240 /llvm/lib/Target/PowerPC/PPCISelLowering.cpp
parent5e241b11ed541145bb13759793d85485bdd73808 (diff)
downloadbcm5719-llvm-fa7057a415d5de8bec0063b2e9c96836c08468ab.tar.gz
bcm5719-llvm-fa7057a415d5de8bec0063b2e9c96836c08468ab.zip
[PowerPC] Refactor popcnt[dw] target features
Instead of using two feature bits, one to indicate the availability of the popcnt[dw] instructions, and another to indicate whether or not they're fast, use a single enum. This allows more consistent control via target attribute strings, and via Clang's command line. llvm-svn: 264690
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCISelLowering.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCISelLowering.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index 6a16e015a73..f3251ba8db7 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -214,7 +214,7 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
setOperationAction(ISD::CTTZ_ZERO_UNDEF, MVT::i64, Expand);
setOperationAction(ISD::CTLZ_ZERO_UNDEF, MVT::i64, Expand);
- if (Subtarget.hasPOPCNTD() && !Subtarget.isPOPCNTDSlow()) {
+ if (Subtarget.hasPOPCNTD() == PPCSubtarget::POPCNTD_Fast) {
setOperationAction(ISD::CTPOP, MVT::i32 , Legal);
setOperationAction(ISD::CTPOP, MVT::i64 , Legal);
} else {
OpenPOWER on IntegriCloud