[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Chris Lattner sabre at nondot.org
Tue Apr 17 15:53:20 PDT 2007



Changes in directory llvm/lib/CodeGen/SelectionDAG:

TargetLowering.cpp updated: 1.110 -> 1.111
---
Log message:

Fix a bug in my previous patch, grabbing the shift amount width from the 
wrong operand.


---
Diffs of the changes:  (+2 -2)

 TargetLowering.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.110 llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.111
--- llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.110	Tue Apr 17 16:14:16 2007
+++ llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp	Tue Apr 17 17:53:02 2007
@@ -581,7 +581,7 @@
           }          
           
           SDOperand NewSA = 
-            TLO.DAG.getConstant(ShAmt-C1, Op.getOperand(0).getValueType());
+            TLO.DAG.getConstant(ShAmt-C1, Op.getOperand(1).getValueType());
           MVT::ValueType VT = Op.getValueType();
           return TLO.CombineTo(Op, TLO.DAG.getNode(ISD::SRL, VT,
                                                    InOp.getOperand(0), NewSA));
@@ -619,7 +619,7 @@
           }          
           
           SDOperand NewSA =
-            TLO.DAG.getConstant(Diff, Op.getOperand(0).getValueType());
+            TLO.DAG.getConstant(Diff, Op.getOperand(1).getValueType());
           return TLO.CombineTo(Op, TLO.DAG.getNode(Opc, VT,
                                                    InOp.getOperand(0), NewSA));
         }






More information about the llvm-commits mailing list