aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-10-28 16:27:35 +0000
committerChris Lattner <sabre@nondot.org>2005-10-28 16:27:35 +0000
commit325231c925a5f80c3e41635762547d80affecff3 (patch)
tree62512251acadca7fdf44bd0a158fcea67665d141 /lib/Transforms
parent908ae27a9073e2f105f8a0a4dd092d7fea8472a4 (diff)
downloadexternal_llvm-325231c925a5f80c3e41635762547d80affecff3.zip
external_llvm-325231c925a5f80c3e41635762547d80affecff3.tar.gz
external_llvm-325231c925a5f80c3e41635762547d80affecff3.tar.bz2
Fix a bit of backwards logic that broke exptree and smg2000
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24056 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 4aab096..e029f7a 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -3862,7 +3862,7 @@ Instruction *InstCombiner::PromoteCastOfAllocation(CastInst &CI,
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);
}