[llvm] [LV] Emit better debug and opt-report messages when vectorization is disallowed in the LoopVectorizer (PR #158513)
Tibor Győri via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 17 03:32:05 PST 2025
================
@@ -0,0 +1,94 @@
+; REQUIRES: asserts
+
+; TEST 1
+; Checks that we emit only the correct debug messages and
+; optimization remark when the loop vectorizer is disabled by loop metadata.
+; RUN: opt -S -passes=loop-vectorize -pass-remarks=loop-vectorize \
+; RUN: -pass-remarks-missed=loop-vectorize \
+; RUN: -pass-remarks-analysis=loop-vectorize -debug \
+; RUN: < %s 2>&1 | FileCheck --dump-input=always --check-prefixes=METADATA,BOTH %s
+; TEST 2
+; Checks that we emit only the correct debug messages and
+; optimization remark when the loop is not vectorized due to the
+; vectorize-forced-only pass option being set.
+; Strip metadata for FORCEDONLY run, keep it for METADATA run
+; RUN: sed 's/,[[:space:]]*!llvm\.loop[[:space:]]*!0//' %s | \
+; RUN: opt -S -passes='loop-vectorize<vectorize-forced-only>' \
+; RUN: -pass-remarks=loop-vectorize \
+; RUN: -pass-remarks-missed=loop-vectorize \
+; RUN: -pass-remarks-analysis=loop-vectorize -debug \
+; RUN: 2>&1 | FileCheck --dump-input=always --check-prefixes=FORCEDONLY,BOTH %s
+; TEST 3
+; Checks that we emit only the correct debug messages and
+; optimization remark when the loop vectorizer is disabled by loop metadata
+; that requests no loop transformations.
+; RUN: opt -S -passes=loop-vectorize -pass-remarks=loop-vectorize \
+; RUN: -pass-remarks-missed=loop-vectorize \
+; RUN: -pass-remarks-analysis=loop-vectorize -debug \
+; RUN: -force-vector-interleave=1 -force-vector-width=2 \
+; RUN: < %s 2>&1 | FileCheck --dump-input=always %s
----------------
TiborGY wrote:
nope, good catch, removed
https://github.com/llvm/llvm-project/pull/158513
More information about the llvm-commits
mailing list