From: Bill Wendling Date: Fri, 19 Oct 2007 01:10:49 +0000 (+0000) Subject: Negative indices aren't allowed here. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=1851898e757008228453aa3f4e3e06bbaecce04d;p=oota-llvm.git Negative indices aren't allowed here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43161 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index c1110368250..9516dff6cb8 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -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);