[PowerPC] Fix VSX permutation isel
authorHal Finkel <hfinkel@anl.gov>
Fri, 28 Mar 2014 20:24:55 +0000 (20:24 +0000)
committerHal Finkel <hfinkel@anl.gov>
Fri, 28 Mar 2014 20:24:55 +0000 (20:24 +0000)
Not only did I invert the indices when I wrote the code, but I also did the
same thing when I wrote the regression test. Oops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205046 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCISelDAGToDAG.cpp
test/CodeGen/PowerPC/vsx.ll

index b8a042503d2e412f3aa90636e4788583adc9643f..3bbc8397c9248418ec385eeb5c1ab9e84d9a17b4 100644 (file)
@@ -1351,7 +1351,7 @@ SDNode *PPCDAGToDAGISel::Select(SDNode *N) {
         else
           DM[i] = 1;
 
-      SDValue DMV = CurDAG->getTargetConstant(DM[0] | (DM[1] << 1), MVT::i32);
+      SDValue DMV = CurDAG->getTargetConstant(DM[1] | (DM[0] << 1), MVT::i32);
 
       if (Op1 == Op2 && DM[0] == 0 && DM[1] == 0 &&
           Op1.getOpcode() == ISD::SCALAR_TO_VECTOR &&
index 4f4f816d7237d20c14ca2b6d6bd8e59941dd69db..ec10bc683b01797cfb7b18f9e5a3a88dc852374f 100644 (file)
@@ -465,7 +465,7 @@ define <2 x double> @test54(<2 x double> %a, <2 x double> %b) {
   ret <2 x double> %v
 
 ; CHECK-LABEL: @test54
-; CHECK: xxpermdi 34, 34, 35, 1
+; CHECK: xxpermdi 34, 34, 35, 2
 ; CHECK: blr
 }