Negative indices aren't allowed here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43161 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling 2007-10-19 01:10:49 +00:00
parent fabd32deb0
commit 1851898e75

View File

@ -4139,7 +4139,7 @@ SDOperand SelectionDAGLegalize::ExpandEXTRACT_VECTOR_ELT(SDOperand Op) {
MVT::getSizeInBits(TLI.getPointerTy()))
Idx = DAG.getNode(ISD::TRUNCATE, TLI.getPointerTy(), StackPtr);
else
Idx = DAG.getNode(ISD::SIGN_EXTEND, TLI.getPointerTy(), StackPtr);
Idx = DAG.getNode(ISD::ZERO_EXTEND, TLI.getPointerTy(), StackPtr);
StackPtr = DAG.getNode(ISD::ADD, Idx.getValueType(), Idx, StackPtr);