[PATCH] D101916: [LoopVectorize] Fix crash for predicated instructions with scalable VF

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 19 01:12:40 PDT 2021


sdesmalen added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5607
+  // tail when the scalar epilogue is not allowed.
+  if (loopHasScalarWithPredication(MaxScalableVF, !isScalarEpilogueAllowed())) {
+    reportVectorizationInfo(
----------------
In the previous iteration you changed this condition, but this didn't affect the test. Can you add a test that exercises this change?


================
Comment at: llvm/test/Transforms/LoopVectorize/scalable-predicate-instruction.ll:16
+define void  @predicate_instruction_with_scalableVF(i32* %a, i32* %b, i32* %cond, i64 %n)  #0 {
+; CHECK-LABEL: @predicate_instruction_with_scalableVF(
+; CHECK-NEXT:  entry:
----------------
Instead of checking the output to be exactly this, is it sufficient to just check no vector type is being used?
e.g. CHECK-NOT: <vscale x 4>


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101916



More information about the llvm-commits mailing list