mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-10 20:33:15 +00:00
Minor tweak to get isel opt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24663 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3aed79eadb
commit
3802c2552f
@ -1324,7 +1324,8 @@ static void OptimizeGEPExpression(GetElementPtrInst *GEPI,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!hasConstantIndex) return;
|
// If this is a GEP &Alloca, 0, 0, forward subst the frame index into uses.
|
||||||
|
if (!hasConstantIndex && !isa<AllocaInst>(GEPI->getOperand(0))) return;
|
||||||
|
|
||||||
// Otherwise, decompose the GEP instruction into multiplies and adds. Sum the
|
// Otherwise, decompose the GEP instruction into multiplies and adds. Sum the
|
||||||
// constant offset (which we now know is non-zero) and deal with it later.
|
// constant offset (which we now know is non-zero) and deal with it later.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user