mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Teach instcombine to respect and preserve inbounds. Add inbounds
to a few tests where it is required for the expected transformation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77290 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -349,7 +349,9 @@ Value *SCEVExpander::expandAddToGEP(const SCEV *const *op_begin,
|
||||
return GEP;
|
||||
}
|
||||
|
||||
// Insert a pretty getelementptr.
|
||||
// Insert a pretty getelementptr. Note that this GEP is not marked inbounds,
|
||||
// because ScalarEvolution may have changed the address arithmetic to
|
||||
// compute a value which is beyond the end of the allocated object.
|
||||
Value *GEP = Builder.CreateGEP(V,
|
||||
GepIndices.begin(),
|
||||
GepIndices.end(),
|
||||
|
||||
Reference in New Issue
Block a user