mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-03 15:36:21 +00:00
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
This commit is contained in:
parent
908ae27a90
commit
325231c925
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user