diff options
| author | Craig Topper <craig.topper@intel.com> | 2018-06-26 04:53:42 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@intel.com> | 2018-06-26 04:53:42 +0000 |
| commit | 08dae1682d5f4590fa9dc0bc2ce8c614fef23579 (patch) | |
| tree | 9886caaf621c30d2cdc7c0f34f1b46296915932b /llvm/lib | |
| parent | f5c66a1c4689e7b8f541e614ea42ccfa4182e622 (diff) | |
| download | bcm5719-llvm-08dae1682d5f4590fa9dc0bc2ce8c614fef23579.tar.gz bcm5719-llvm-08dae1682d5f4590fa9dc0bc2ce8c614fef23579.zip | |
[X86] Don't use getScalarShiftAmountTy to get the immediate type for target specific VSHLDQ/VSRLDQ nodes.
These opcodes have a fixed type of i8 for their immediate and shouldn't have anything to do with the scalar shift amount used by target independent shift nodes.
llvm-svn: 335578
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 660e555bc71..fda432b42d8 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -6655,9 +6655,8 @@ static SDValue getVShift(bool isLeft, EVT VT, SDValue SrcOp, unsigned NumBits, MVT ShVT = MVT::v16i8; unsigned Opc = isLeft ? X86ISD::VSHLDQ : X86ISD::VSRLDQ; SrcOp = DAG.getBitcast(ShVT, SrcOp); - MVT ScalarShiftTy = TLI.getScalarShiftAmountTy(DAG.getDataLayout(), VT); assert(NumBits % 8 == 0 && "Only support byte sized shifts"); - SDValue ShiftVal = DAG.getConstant(NumBits/8, dl, ScalarShiftTy); + SDValue ShiftVal = DAG.getConstant(NumBits/8, dl, MVT::i8); return DAG.getBitcast(VT, DAG.getNode(Opc, dl, ShVT, SrcOp, ShiftVal)); } @@ -10765,9 +10764,7 @@ static SDValue lowerVectorShuffleAsElementInsertion( V2 = DAG.getBitcast(MVT::v16i8, V2); V2 = DAG.getNode( X86ISD::VSHLDQ, DL, MVT::v16i8, V2, - DAG.getConstant(V2Index * EltVT.getSizeInBits() / 8, DL, - DAG.getTargetLoweringInfo().getScalarShiftAmountTy( - DAG.getDataLayout(), VT))); + DAG.getConstant(V2Index * EltVT.getSizeInBits() / 8, DL, MVT::i8)); V2 = DAG.getBitcast(VT, V2); } } |

