[PATCH] D91383: [BasicAA] Make alias GEP positive offset handling symmetric

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 12 13:13:39 PST 2020


jdoerfert added inline comments.


================
Comment at: llvm/lib/Analysis/AliasAnalysisEvaluator.cpp:177
+      assert(AR == AA.alias(*I2, I2Size, *I1, I1Size) &&
+             "AA query not symmetric");
     }
----------------
nikic wrote:
> This assertion currently fails on `Analysis/BasicAA/zext.ll`.
> 
> Arguably this should be asserted in AA itself, but a) I'm not confident enough that this is the only asymmetry that exists right now and b) a more general assertion would have to be behind EXPENSIVE_CHECKS, so I figured this would be a good place to verify this initially.
Can you add the reasoning as a TODO maybe?


================
Comment at: llvm/lib/Analysis/BasicAliasAnalysis.cpp:1452
+        (-GEP1BaseOffset).uge(V2Size.getValue()))
+      return NoAlias;
 
----------------
Copy paste error?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91383



More information about the llvm-commits mailing list