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 | 46d232d4bc198ce4a347e74f331a99142a02276d (patch) | |
tree | 5f547c38b48123f48b3657ed131a5e92bb3af09a /lib | |
parent | 58e2287d0032f87e67e2f801e2b5c8cec1c7bb41 (diff) | |
download | external_llvm-46d232d4bc198ce4a347e74f331a99142a02276d.zip external_llvm-46d232d4bc198ce4a347e74f331a99142a02276d.tar.gz external_llvm-46d232d4bc198ce4a347e74f331a99142a02276d.tar.bz2 |
Remove a condition which is always true.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67089 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 44d85e7..fa24d89 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/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())); |