[PATCH] D98715: [LoopVectorize] Add support for scalable vectorization of induction variables

Kerry McLaughlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 26 11:41:15 PDT 2021


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

I think this looks good, I just have a couple of minor comments



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:2254
+  if (Step->getType()->isFloatingPointTy())
+    RuntimeVF = Builder.CreateUIToFP(RuntimeVF, Step->getType());
+  Value *Mul = Builder.CreateBinOp(MulOp, Step, RuntimeVF);
----------------
`buildScalarSteps` seems to use `CreateSIToFP`, should we also be using this here?


================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/sve-inductions.ll:112
+; CHECK-NEXT: %[[VSCALE:.*]] = call i32 @llvm.vscale.i32()
+; CHECK-NEXT: %[[INC:.*]] = shl i32 %6, 3
+; CHECK-NEXT: %[[TMP:.*]] = insertelement <vscale x 4 x i32> poison, i32 %[[INC]], i32 0
----------------
nit: I think this could be checking for `%[[VSCALE]]` instead of %6?


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

https://reviews.llvm.org/D98715



More information about the llvm-commits mailing list