[PATCH] D83576: [BasicAA] Fix -basicaa-recphi for geps with negative offsets

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 10 14:00:26 PDT 2020


hfinkel added inline comments.


================
Comment at: llvm/lib/Analysis/BasicAliasAnalysis.cpp:1668
           // would recurse and always get a MayAlias. Handle this case specially
           // below.
+          if (PV1GEP->getPointerOperand() == PN &&
----------------
I would like to see the "The option checks for recursive phi, that recurse through a contant gep. If it finds one, it performs aliasing calculations using the other phi operands with an unknown size, to specify that an unknown number of elements after the initial value are potentially accessed. This works fine expect where the constant is negative, as the size is still considered to be positive. " part from the patch description -- that information -- in the comment here.

Also, can you make a lambda function do avoid the duplication of the comment and the condition in two places?


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

https://reviews.llvm.org/D83576





More information about the llvm-commits mailing list