[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Oct 28 09:27:47 PDT 2005



Changes in directory llvm/lib/Transforms/Scalar:

InstructionCombining.cpp updated: 1.398 -> 1.399
---
Log message:

Fix a bit of backwards logic that broke exptree and smg2000


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

 InstructionCombining.cpp |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.398 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.399
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.398	Thu Oct 27 12:13:11 2005
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp	Fri Oct 28 11:27:35 2005
@@ -3862,7 +3862,7 @@
       Amt = ConstantUInt::get(Type::UIntTy, Scale);
       if (ConstantUInt *CI = dyn_cast<ConstantUInt>(NumElements))
         Amt = ConstantExpr::getMul(CI, cast<ConstantUInt>(Amt));
-      else if (cast<ConstantUInt>(Amt)->getValue() == 1) {
+      else if (Scale != 1) {
         Instruction *Tmp = BinaryOperator::createMul(Amt, NumElements, "tmp");
         Amt = InsertNewInstBefore(Tmp, AI);
       }






More information about the llvm-commits mailing list