diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-10-28 16:27:35 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-10-28 16:27:35 +0000 |
| commit | b9d3ca5c3c823cb138ac25fdbe4c0745e4a1705a (patch) | |
| tree | 025a7a05d32e8c5b19e5e91dcc92a51efc4106df /llvm/lib/Transforms | |
| parent | 1959575208c49e22f1bd73ed03a7ea488c8fe9a2 (diff) | |
| download | bcm5719-llvm-b9d3ca5c3c823cb138ac25fdbe4c0745e4a1705a.tar.gz bcm5719-llvm-b9d3ca5c3c823cb138ac25fdbe4c0745e4a1705a.zip | |
Fix a bit of backwards logic that broke exptree and smg2000
llvm-svn: 24056
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 4aab0963352..e029f7a6571 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/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); } |

