mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-08 03:30:22 +00:00
the GEP faq says that only inbounds geps are guaranteed to not overflow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123218 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f7624bc6dd
commit
9651870815
@ -2722,11 +2722,12 @@ const SCEV *ScalarEvolution::createNodeForPHI(PHINode *PN) {
|
||||
HasNUW = true;
|
||||
if (OBO->hasNoSignedWrap())
|
||||
HasNSW = true;
|
||||
} else if (isa<GEPOperator>(BEValueV)) {
|
||||
} else if (const GEPOperator *GEP =
|
||||
dyn_cast<GEPOperator>(BEValueV)) {
|
||||
// If the increment is a GEP, then we know it won't perform an
|
||||
// unsigned overflow, because the address space cannot be
|
||||
// wrapped around.
|
||||
HasNUW = true;
|
||||
HasNUW |= GEP->isInBounds();
|
||||
}
|
||||
|
||||
const SCEV *StartVal = getSCEV(StartValueV);
|
||||
|
Loading…
Reference in New Issue
Block a user