[PATCH] D100763: [LoopVectorize] Don't create unnecessary vscale intrinsic calls

Fraser Cormack via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 20 01:22:10 PDT 2021


frasercrmck added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:1116
+      ConstantInt::get(Step->getType(), StepVal * VF.getKnownMinValue());
+  return VF.isScalable() ? B.CreateVScale(NewStep) : NewStep;
 }
----------------
Not that this is wrong, but would it be inappropriate to make `CreateVScale` detect a zero step and return zero?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100763



More information about the llvm-commits mailing list