[llvm] [LV] Use shl for (VFxUF * vscale) when creating minimum iter check. (PR #153495)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 14 04:39:07 PDT 2025


================
@@ -824,7 +824,13 @@ namespace llvm {
 Value *createStepForVF(IRBuilderBase &B, Type *Ty, ElementCount VF,
                        int64_t Step) {
   assert(Ty->isIntegerTy() && "Expected an integer step");
-  return B.CreateElementCount(Ty, VF.multiplyCoefficientBy(Step));
+  if (!VF.isScalable() || !isPowerOf2_64(VF.getKnownMinValue()) ||
----------------
fhahn wrote:

There was one user that didn't pass an actual VF, but that was easy to update to use IRBuilder::CreateElementCount.

I added the assert

https://github.com/llvm/llvm-project/pull/153495


More information about the llvm-commits mailing list