[llvm] [ConstraintElim] Use constraints from bounded memory accesses (PR #155253)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 26 09:12:32 PDT 2025
================
@@ -1109,10 +1113,43 @@ void State::addInfoForInductions(BasicBlock &BB) {
}
}
+static bool getConstraintFromMemoryAccess(GetElementPtrInst &GEP,
+ uint64_t AccessSize,
+ CmpPredicate &Pred, Value *&A,
+ Value *&B, const DataLayout &DL,
+ const TargetLibraryInfo &TLI) {
+ auto Offset = collectOffsets(cast<GEPOperator>(GEP), DL);
+ if (!Offset.NW.isInBounds())
----------------
dtcxzyw wrote:
Without inbounds, a GEP may produce a pointer beyond the object boundary.
https://github.com/llvm/llvm-project/pull/155253
More information about the llvm-commits
mailing list