[llvm] [LoopIdiomVectorize] Bail when vectorization is disabled (PR #181142)
Min-Yih Hsu via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 18 09:11:43 PST 2026
================
@@ -219,6 +226,14 @@ bool LoopIdiomVectorize::run(Loop *L) {
if (DisableAll || F.hasOptSize())
return false;
+ // Bail if vectorization is disabled on loop.
+ LoopVectorizeHints Hints(L, /*InterleaveOnlyWhenForced=*/true, ORE);
+ if (!Hints.allowVectorization(&F, L, /*VectorizeOnlyWhenForced=*/false)) {
+ LLVM_DEBUG(dbgs() << DEBUG_TYPE << " is disabled on " << F.getName()
----------------
mshockwave wrote:
could we use the loop's name instead of function name?
https://github.com/llvm/llvm-project/pull/181142
More information about the llvm-commits
mailing list