[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri Jan 14 09:18:14 PST 2005
Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.303 -> 1.304
---
Log message:
Fix a compile crash on spiff
---
Diffs of the changes: (+4 -7)
Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.303 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.304
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.303 Thu Jan 13 18:20:05 2005
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Fri Jan 14 11:17:59 2005
@@ -2123,16 +2123,13 @@
}
}
} else {
- //if (Op->getType() != Scale->getType())
- if (Size != 1) {
- // Convert to correct type.
- Op = IC.InsertNewInstBefore(new CastInst(Op, SIntPtrTy,
- Op->getName()+".c"), I);
-
+ // Convert to correct type.
+ Op = IC.InsertNewInstBefore(new CastInst(Op, SIntPtrTy,
+ Op->getName()+".c"), I);
+ if (Size != 1)
// We'll let instcombine(mul) convert this to a shl if possible.
Op = IC.InsertNewInstBefore(BinaryOperator::createMul(Op, Scale,
GEP->getName()+".idx"), I);
- }
// Emit an add instruction.
Result = IC.InsertNewInstBefore(BinaryOperator::createAdd(Op, Result,
More information about the llvm-commits
mailing list