summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 1ad8e802585..8ffdf63df98 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -4150,9 +4150,9 @@ SDOperand SelectionDAGLegalize::ExpandEXTRACT_VECTOR_ELT(SDOperand Op) {
if (MVT::getSizeInBits(Idx.getValueType()) >
MVT::getSizeInBits(TLI.getPointerTy()))
- Idx = DAG.getNode(ISD::TRUNCATE, TLI.getPointerTy(), StackPtr);
+ Idx = DAG.getNode(ISD::TRUNCATE, TLI.getPointerTy(), Idx);
else
- Idx = DAG.getNode(ISD::ZERO_EXTEND, TLI.getPointerTy(), StackPtr);
+ Idx = DAG.getNode(ISD::ZERO_EXTEND, TLI.getPointerTy(), Idx);
StackPtr = DAG.getNode(ISD::ADD, Idx.getValueType(), Idx, StackPtr);
OpenPOWER on IntegriCloud