[llvm] [LV] Emit better debug and opt-report messages when vectorization is disallowed in the LoopVectorizer (PR #158513)
Tobias Stadler via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 15 06:20:32 PDT 2025
================
@@ -182,14 +182,41 @@ void LoopVectorizeHints::setAlreadyVectorized() {
bool LoopVectorizeHints::allowVectorization(
Function *F, Loop *L, bool VectorizeOnlyWhenForced) const {
if (getForce() == LoopVectorizeHints::FK_Disabled) {
- LLVM_DEBUG(dbgs() << "LV: Not vectorizing: #pragma vectorize disable.\n");
- emitRemarkWithHints();
+ if (Force.Value == LoopVectorizeHints::FK_Disabled) {
+ LLVM_DEBUG(dbgs() << "LV: Not vectorizing: #pragma vectorize disable.\n");
+ ORE.emit(OptimizationRemarkMissed(LV_NAME, "MissedExplicitlyDisabled",
----------------
tobias-stadler wrote:
Why is this duplicated from emitRemarkWithHints?
https://github.com/llvm/llvm-project/pull/158513
More information about the llvm-commits
mailing list