diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-03-17 17:55:15 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-03-17 17:55:15 +0000 |
| commit | e549493a55d4da871b626d1733f2fda8048ea37a (patch) | |
| tree | 1615ee0439077092ec5a90cbd0b381498ddd87fb | |
| parent | 7a178a40a1e360b61068df8526bd6897ed53c7fb (diff) | |
| download | bcm5719-llvm-e549493a55d4da871b626d1733f2fda8048ea37a.tar.gz bcm5719-llvm-e549493a55d4da871b626d1733f2fda8048ea37a.zip | |
Remove a condition which is always true.
llvm-svn: 67089
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 44d85e706c6..fa24d892176 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -7533,7 +7533,7 @@ Instruction *InstCombiner::PromoteCastOfAllocation(BitCastInst &CI, 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 @@ Instruction *InstCombiner::visitAllocationInst(AllocationInst &AI) { 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())); |

