[llvm-commits] [llvm] r67089 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Chris Lattner
sabre at nondot.org
Tue Mar 17 10:55:15 PDT 2009
Author: lattner
Date: Tue Mar 17 12:55:15 2009
New Revision: 67089
URL: http://llvm.org/viewvc/llvm-project?rev=67089&view=rev
Log:
Remove a condition which is always true.
Modified:
llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=67089&r1=67088&r2=67089&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Tue Mar 17 12:55:15 2009
@@ -7533,7 +7533,7 @@
if (isa<ConstantInt>(NumElements))
Amt = Multiply(cast<ConstantInt>(NumElements), cast<ConstantInt>(Amt));
// otherwise multiply the amount and the number of elements
- else if (Scale != 1) {
+ else {
Instruction *Tmp = BinaryOperator::CreateMul(Amt, NumElements, "tmp");
Amt = InsertNewInstBefore(Tmp, AI);
}
@@ -10979,8 +10979,8 @@
if (isa<AllocaInst>(AI) && AI.getAllocatedType()->isSized()) {
// If alloca'ing a zero byte object, replace the alloca with a null pointer.
- // Note that we only do this for alloca's, because malloc should allocate and
- // return a unique pointer, even for a zero byte allocation.
+ // Note that we only do this for alloca's, because malloc should allocate
+ // and return a unique pointer, even for a zero byte allocation.
if (TD->getTypePaddedSize(AI.getAllocatedType()) == 0)
return ReplaceInstUsesWith(AI, Constant::getNullValue(AI.getType()));
More information about the llvm-commits
mailing list