================
@@ -5546,12 +5574,17 @@ void LoopVectorizationPlanner::plan(ElementCount 
UserVF, unsigned UserIC,
              "VF needs to be a power of two");
       // Collect the instructions (and their associated costs) that will be 
more
       // profitable to scalarize.
-      CM.collectNonVectorizedAndSetWideningDecisions(UserVF);
+      for_each(EnabledCMs, [&](auto *CurrentCM) {
+        CurrentCM->collectNonVectorizedAndSetWideningDecisions(UserVF);
+      });
       ElementCount EpilogueUserVF =
           ElementCount::getFixed(EpilogueVectorizationForceVF);
       if (EpilogueUserVF.isVector() &&
           ElementCount::isKnownLT(EpilogueUserVF, UserVF)) {
-        CM.collectNonVectorizedAndSetWideningDecisions(EpilogueUserVF);
+        for_each(EnabledCMs, [&](auto *CurrentCM) {
+          CurrentCM->collectNonVectorizedAndSetWideningDecisions(
+              EpilogueUserVF);
+        });
----------------
hassnaaHamdi wrote:

No, we don't need it, but I want to keep it as it is to keep the current logic 
working even if I enabled the new tail-folding policy until I can eventually 
emit tail-folded epilogue. But I'm also not sure if this thought is correct or 
not.
I will add a TODO to remove it once we complete the feature. what do you think ?

https://github.com/llvm/llvm-project/pull/202820
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to