Fix constant used for pshufb mask when lowering v16i8 shuffles. Bug introduced in...
authorCraig Topper <craig.topper@gmail.com>
Tue, 22 May 2012 06:09:38 +0000 (06:09 +0000)
committerCraig Topper <craig.topper@gmail.com>
Tue, 22 May 2012 06:09:38 +0000 (06:09 +0000)
llvm-svn: 157236

llvm/lib/Target/X86/X86ISelLowering.cpp

index 4e4cf27..50a2d78 100644 (file)
@@ -5805,7 +5805,7 @@ SDValue LowerVECTOR_SHUFFLEv16i8(ShuffleVectorSDNode *SVOp,
     for (unsigned i = 0; i != 16; ++i) {
       int EltIdx = MaskVals[i];
       EltIdx = (EltIdx < 16) ? 0x80 : EltIdx - 16;
-      pshufbMask.push_back(DAG.getConstant(EltIdx - 16, MVT::i8));
+      pshufbMask.push_back(DAG.getConstant(EltIdx, MVT::i8));
     }
     V2 = DAG.getNode(X86ISD::PSHUFB, dl, MVT::v16i8, V2,
                      DAG.getNode(ISD::BUILD_VECTOR, dl,