[llvm] [LV] Fix emission of debug message in legality check (PR #101924)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 3 12:16:06 PDT 2024
================
@@ -1519,17 +1521,21 @@ bool LoopVectorizationLegality::canVectorize(bool UseVPlanNativePath) {
return false;
}
- LLVM_DEBUG(dbgs() << "LV: We can vectorize this loop"
- << (LAI->getRuntimePointerChecking()->Need
- ? " (with a runtime bound check)"
- : "")
- << "!\n");
-
unsigned SCEVThreshold = VectorizeSCEVCheckThreshold;
if (Hints->getForce() == LoopVectorizeHints::FK_Enabled)
SCEVThreshold = PragmaVectorizeSCEVCheckThreshold;
+ if (Result) {
----------------
fhahn wrote:
also keep where the message is emitted at the original place, so `SCEVThreshold`'s definition is closer to use?
https://github.com/llvm/llvm-project/pull/101924
More information about the llvm-commits
mailing list