summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
diff options
context:
space:
mode:
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>2015-02-03 21:58:23 +0000
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>2015-02-03 21:58:23 +0000
commitfe88b189905e95027a747a653bf77ed03869208b (patch)
tree7c60410622c68e07b53c787f53f0e5a69dba3c37 /llvm/lib/Target/PowerPC/PPCSubtarget.cpp
parentcf9fdd58763580af4c3ef851dac8016883350480 (diff)
downloadbcm5719-llvm-fe88b189905e95027a747a653bf77ed03869208b.tar.gz
bcm5719-llvm-fe88b189905e95027a747a653bf77ed03869208b.zip
[PowerPC] Implement the vpopcnt instructions for POWER8
Patch by Kit Barton. Add the vector population count instructions for byte, halfword, word, and doubleword sizes. There are two major changes here: PPCISelLowering.cpp: Make CTPOP legal for vector types. PPCRegisterInfo.td: Added v2i64 to the VRRC register definition. This is needed for the doubleword variations of the integer ops that were added in P8. Test Plan Test the instruction vpcnt* encoding/decoding in ppc64-encoding-vmx.s Test the generation of the vpopcnt instructions for various vector data types. When adding the v2i64 type to the Vector Register set, I also needed to add the appropriate bit conversion patterns between v2i64 and the existing vector types. Testing for these conversions were also added in the test case by passing a different vector type as a parameter into the test functions. There is also a run step that will ensure the vpopcnt instructions are generated when the vsx feature is disabled. llvm-svn: 228046
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCSubtarget.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCSubtarget.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
index 9aaf3ab75d6..e025a3bbcf5 100644
--- a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
+++ b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
@@ -65,6 +65,7 @@ void PPCSubtarget::initializeEnvironment() {
HasQPX = false;
HasVSX = false;
HasP8Vector = false;
+ HasP8Altivec = false;
HasFCPSGN = false;
HasFSQRT = false;
HasFRE = false;
OpenPOWER on IntegriCloud