summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPC.td
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2013-03-28 13:29:47 +0000
committerHal Finkel <hfinkel@anl.gov>2013-03-28 13:29:47 +0000
commita4d074863a4a1c1004fb17eb8b685241fed73a1b (patch)
tree631a3f2ecb6e5486c8ada4a3bd2806dc277f3fd1 /llvm/lib/Target/PowerPC/PPC.td
parent66ceaa439a9a664c5587b01710694bc1d086650e (diff)
downloadbcm5719-llvm-a4d074863a4a1c1004fb17eb8b685241fed73a1b.tar.gz
bcm5719-llvm-a4d074863a4a1c1004fb17eb8b685241fed73a1b.zip
Add the PPC64 popcntd instruction
PPC ISA 2.06 (P7, A2, etc.) has a popcntd instruction. Add this instruction and tell TTI about it so that popcount-loop recognition will know about it. llvm-svn: 178233
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPC.td')
-rw-r--r--llvm/lib/Target/PowerPC/PPC.td11
1 files changed, 7 insertions, 4 deletions
diff --git a/llvm/lib/Target/PowerPC/PPC.td b/llvm/lib/Target/PowerPC/PPC.td
index 992913602a1..dfab690a9d4 100644
--- a/llvm/lib/Target/PowerPC/PPC.td
+++ b/llvm/lib/Target/PowerPC/PPC.td
@@ -61,6 +61,8 @@ def FeatureSTFIWX : SubtargetFeature<"stfiwx","HasSTFIWX", "true",
"Enable the stfiwx instruction">;
def FeatureISEL : SubtargetFeature<"isel","HasISEL", "true",
"Enable the isel instruction">;
+def FeaturePOPCNTD : SubtargetFeature<"popcntd","HasPOPCNTD", "true",
+ "Enable the popcnt[dw] instructions">;
def FeatureBookE : SubtargetFeature<"booke", "IsBookE", "true",
"Enable Book E instructions">;
def FeatureQPX : SubtargetFeature<"qpx","HasQPX", "true",
@@ -79,7 +81,6 @@ def FeatureQPX : SubtargetFeature<"qpx","HasQPX", "true",
// LFIWAX p6, p6x, p7 lfiwax
// LFIWZX p7 lfiwzx
// POPCNTB p5 through p7 popcntb and related instructions
-// POPCNTD p7 popcntd and related instructions
// RECIP_PREC p6, p6x, p7 higher precision reciprocal estimates
// VSX p7 vector-scalar instruction set
@@ -131,12 +132,13 @@ def : ProcessorModel<"e5500", PPCE5500Model,
def : Processor<"a2", PPCA2Itineraries, [DirectiveA2, FeatureBookE,
FeatureMFOCRF, FeatureFSqrt,
FeatureSTFIWX, FeatureISEL,
- Feature64Bit
+ FeaturePOPCNTD, Feature64Bit
/*, Feature64BitRegs */]>;
def : Processor<"a2q", PPCA2Itineraries, [DirectiveA2, FeatureBookE,
FeatureMFOCRF, FeatureFSqrt,
FeatureSTFIWX, FeatureISEL,
- Feature64Bit /*, Feature64BitRegs */,
+ FeaturePOPCNTD, Feature64Bit
+ /*, Feature64BitRegs */,
FeatureQPX]>;
def : Processor<"pwr3", G5Itineraries,
[DirectivePwr3, FeatureAltivec, FeatureMFOCRF,
@@ -160,7 +162,8 @@ def : Processor<"pwr6x", G5Itineraries,
def : Processor<"pwr7", G5Itineraries,
[DirectivePwr7, FeatureAltivec,
FeatureMFOCRF, FeatureFSqrt, FeatureSTFIWX,
- FeatureISEL, Feature64Bit /*, Feature64BitRegs */]>;
+ FeatureISEL, FeaturePOPCNTD, Feature64Bit
+ /*, Feature64BitRegs */]>;
def : Processor<"ppc", G3Itineraries, [Directive32]>;
def : Processor<"ppc64", G5Itineraries,
[Directive64, FeatureAltivec,
OpenPOWER on IntegriCloud