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

Graham Hunter via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 21 02:31:55 PDT 2022


huntergr added inline comments.


================
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
----------------
fhahn wrote:
> Is the trunc & ext needed for the cash to reproduce? If not, it would be good to remove it.
No. We might be able to use different instructions, but without the zext at least we would have an AddRecExpr, which would just be folded.


================
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
----------------
fhahn wrote:
> 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.
No. I think SCEV already looks through the select at some point; if the condition isn't constant we don't see the crash.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133020



More information about the llvm-commits mailing list