[PATCH] D133020: [LAA] Fix ICE with scAddExpr in forked pointers

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 7 13:02:20 PDT 2022


fhahn accepted this revision.
fhahn added a comment.
This revision is now accepted and ready to land.

LGTM, thanks, with a few additional small test case suggestions.



================
Comment at: llvm/test/Analysis/LoopAccessAnalysis/forked-pointers.ll:928
+  store double 0.000000e+00, ptr %Base1, align 8
+  %iv.zext = zext i32 %iv.trunc to i64
+  %sel = select i1 true, i64 %iv.zext, i64 0
----------------
Is the trunc & ext needed for the cash to reproduce? If not, it would be good to remove it.


================
Comment at: llvm/test/Analysis/LoopAccessAnalysis/forked-pointers.ll:929
+  %iv.zext = zext i32 %iv.trunc to i64
+  %sel = select i1 true, i64 %iv.zext, i64 0
+  %fptr = getelementptr inbounds double, ptr %Base2, i64 %sel
----------------
Can you make the condition here a function argument? Not having the select being fold-able may make the test more robust in case SCEV gets extended to look through trivial selects.


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

https://reviews.llvm.org/D133020



More information about the llvm-commits mailing list