[PATCH] D136227: [LoopVectorize] Fix crash on "Cannot dereference end iterator!"(PR56627)

LiDongjin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 2 01:14:21 PDT 2022


LiDongjin added inline comments.


================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/pr56627.ll:3
+
+; Check that we can vectorize this loop without crashing.
+
----------------
fhahn wrote:
> Would be good to check if we are at least vectorizing (i.e. check at least for `vector.body:` )
the cost model seems not vectorize this problem code. And if i use '-force-vector=4',it will not triggle the crash problem. 


================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/pr56627.ll:17
+
+bb4:
+  %tmp5 = fadd float %tmp2, 0.000000e+00
----------------
fhahn wrote:
> this block can be folded in the previous one.
> 
Done


================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/pr56627.ll:18
+bb4:
+  %tmp5 = fadd float %tmp2, 0.000000e+00
+  %tmp6 = mul i32 0, 0
----------------
fhahn wrote:
> might be better to increment this by a value != 0.0
> 
Done


================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/pr56627.ll:24
+bb8:
+  %tmp9 = phi float [ %tmp5, %bb4 ]
+  ret void
----------------
fhahn wrote:
> Better to return the value to make it used.
> 
Done


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136227



More information about the llvm-commits mailing list