[PATCH] D111294: [LoopVectorize] Fix crash in VPReplicateRecipe::execute() for scalable vectors

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 7 05:30:16 PDT 2021


david-arm added a comment.

This looks like a sensible fix to me. I just had a couple of minor comments ...



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5133
+      if (llvm::all_of(Update->users(),
+                       [&](User *U) { return dyn_cast<PHINode>(U); }))
+        ScalarPtrs.insert(Update);
----------------
Hi @kmclaughlin, I think it's probably better to use `isa<PHINode>` here instead of `dyn_cast<PHINode>`.


================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/sve-widen-gep.ll:121
+; CHECK-LABEL: @pointer_induction(
+; CHECK-NEXT:  entry:
+; CHECK-NEXT:    [[BUFFER_START:%.*]] = getelementptr inbounds [64 x i8], [64 x i8]* [[BUFFER:%.*]], i64 0, i64 0
----------------
Maybe it's worth simplifying the test a little by killing off the CHECK lines before and after the vector.body just to make it easier to read?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111294



More information about the llvm-commits mailing list