[llvm] [LV] Fix emission of debug message in legality check (PR #101924)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 06:36:01 PDT 2024


================
@@ -1528,6 +1525,13 @@ bool LoopVectorizationLegality::canVectorize(bool UseVPlanNativePath) {
     else
       return false;
   }
+  if (Result) {
+    LLVM_DEBUG(dbgs() << "LV: We can vectorize this loop"
----------------
fhahn wrote:

Can this be kept at the original place? the check above is a profitability check, we can still vectorize the loop

Might be good to have a test case


https://github.com/llvm/llvm-project/pull/101924


More information about the llvm-commits mailing list