mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 21:32:39 +00:00
Handle constants without going through SCEV.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186593 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
dfacdd04cd
commit
39f59f4d95
@ -1033,6 +1033,12 @@ bool BoUpSLP::isConsecutiveAccess(Value *A, Value *B) {
|
||||
if (GepA && GepA->getPointerOperand() == PtrB)
|
||||
return false;
|
||||
|
||||
ConstantInt *CA = dyn_cast<ConstantInt>(PtrA);
|
||||
ConstantInt *CB = dyn_cast<ConstantInt>(PtrB);
|
||||
if (CA && CB) {
|
||||
return (CA->getSExtValue() + Sz == CB->getSExtValue());
|
||||
}
|
||||
|
||||
// Calculate the distance.
|
||||
const SCEV *PtrSCEVA = SE->getSCEV(PtrA);
|
||||
const SCEV *PtrSCEVB = SE->getSCEV(PtrB);
|
||||
|
Loading…
x
Reference in New Issue
Block a user