[llvm-commits] [llvm] r43181 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

Chris Lattner sabre at nondot.org
Fri Oct 19 09:47:35 PDT 2007


Author: lattner
Date: Fri Oct 19 11:47:35 2007
New Revision: 43181

URL: http://llvm.org/viewvc/llvm-project?rev=43181&view=rev
Log:
Fix a really nasty vector miscompilation bill recently introduced.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=43181&r1=43180&r2=43181&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Fri Oct 19 11:47:35 2007
@@ -4150,9 +4150,9 @@
 
     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);
 





More information about the llvm-commits mailing list