[PATCH] D144563: [SimplifyCFG] Improve the precision of `PtrValueMayBeModified`

DianQK via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 24 04:41:46 PST 2023


DianQK added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:7132
+            PtrValueMayBeModified = true;
+          }
+          if (!(GEP->isInBounds() &&
----------------
DianQK wrote:
> DianQK wrote:
> > nikic wrote:
> > > The first block probably isn't supposed to be there?
> > Sorry I didn't get.
> > First, we only focus two cases:
> > a. getelementptr (TY, null, not zero)          -> maybe be modified
> > a. getelementptr inbounds (TY, null, not zero) -> poison?
> > 
> > The first
> > ```
> > if (!GEP->isInBounds()) {
> >    PtrValueMayBeModified = true;
> > }
> > ```
> > is the "a" case.
> These two cases are:
> a. getelementptr (TY, null, not zero) -> maybe be modified
> b. getelementptr inbounds (TY, null, not zero) -> poison?
Ping? Is there something I misunderstood?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144563/new/

https://reviews.llvm.org/D144563



More information about the llvm-commits mailing list