[PATCH] D122126: [LoopVectorize] Don't interleave when the number of runtime checks exceeds the threshold

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 29 02:22:11 PDT 2022


dmgreen added a comment.

> Why does this check SelectedVF.Width > 1? Can we just remove it or does that not help?

Does this mean this didn't help? It seems that code would not alter the IC in any case, as it is already returning VectorizationFactor::Disabled.

Just as a point of cleanup, is it possible to move the logic into selectInterleaveCount, so that it returns a value of 1 if there are too many runtime checks? I'm not sure all the info needed would be easily available inside the costmodel though.



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7596
+  unsigned NumRuntimePointerChecks = Requirements.getNumRuntimePointerChecks();
+  return NumRuntimePointerChecks > PragmaVectorizeMemoryCheckThreshold ||
+         NumRuntimePointerChecks >
----------------
Should this be checking Hints.allowReordering like the other uses of PragmaVectorizeMemoryCheckThreshold?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122126



More information about the llvm-commits mailing list