mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-18 13:34:04 +00:00
fix a bug I introduced in r80478 found by the build bot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80482 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
873ff0158e
commit
878daed2aa
@ -11240,7 +11240,8 @@ Instruction *InstCombiner::visitGetElementPtrInst(GetElementPtrInst &GEP) {
|
||||
Scale = ConstantInt::get(Scale->getType(),
|
||||
Scale->getZExtValue() / ArrayEltSize);
|
||||
if (Scale->getZExtValue() != 1) {
|
||||
Constant *C = ConstantExpr::getZExt(Scale, NewIdx->getType());
|
||||
Constant *C = ConstantExpr::getIntegerCast(Scale, NewIdx->getType(),
|
||||
false /*ZExt*/);
|
||||
Instruction *Sc = BinaryOperator::CreateMul(NewIdx, C, "idxscale");
|
||||
NewIdx = InsertNewInstBefore(Sc, GEP);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user