From f185e67844e6229e2b0fe9080a5f66fb01fb7f5a Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 19 Oct 2007 16:47:35 +0000 Subject: [PATCH] Fix a really nasty vector miscompilation bill recently introduced. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43181 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 1ad8e802585..8ffdf63df98 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/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);