Type of vector extract / insert index operand should be iPTR.
authorEvan Cheng <evan.cheng@apple.com>
Fri, 29 Jun 2007 00:01:20 +0000 (00:01 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 29 Jun 2007 00:01:20 +0000 (00:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37784 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp

index 4c1d6ea40696519b8e42b17edcc833d39c2fd7ab..f9c19bc0f041b7917c10e20c6b3e1d4390635de2 100644 (file)
@@ -2959,7 +2959,7 @@ X86TargetLowering::LowerINSERT_VECTOR_ELT(SDOperand Op, SelectionDAG &DAG) {
     if (N1.getValueType() != MVT::i32)
       N1 = DAG.getNode(ISD::ANY_EXTEND, MVT::i32, N1);
     if (N2.getValueType() != MVT::i32)
-      N2 = DAG.getConstant(cast<ConstantSDNode>(N2)->getValue(), MVT::i32);
+      N2 = DAG.getConstant(cast<ConstantSDNode>(N2)->getValue(),getPointerTy());
     return DAG.getNode(X86ISD::PINSRW, VT, N0, N1, N2);
   } else if (MVT::getSizeInBits(BaseVT) == 32) {
     unsigned Idx = cast<ConstantSDNode>(N2)->getValue();