diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 4b1efab9430..a0ed2934fc4 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -31238,8 +31238,9 @@ static SDValue combineExtractVectorElt(SDNode *N, SelectionDAG &DAG, isa<ConstantSDNode>(EltIdx) && isa<ConstantSDNode>(InputVector.getOperand(0))) { uint64_t ExtractedElt = N->getConstantOperandVal(1); - uint64_t InputValue = InputVector.getConstantOperandVal(0); - uint64_t Res = (InputValue >> ExtractedElt) & 1; + auto *InputC = cast<ConstantSDNode>(InputVector.getOperand(0)); + const APInt &InputValue = InputC->getAPIntValue(); + uint64_t Res = InputValue[ExtractedElt]; return DAG.getConstant(Res, dl, MVT::i1); } |

