Negative indices aren't allowed here.

llvm-svn: 43161
This commit is contained in:
Bill Wendling 2007-10-19 01:10:49 +00:00
parent 10432e5a67
commit de16ad1446
1 changed files with 1 additions and 1 deletions

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);