[llvm] [LV, VPlan] Check if plan is compatible to EVL transform (PR #92092)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue May 14 06:30:54 PDT 2024


================
@@ -8539,6 +8539,29 @@ VPRecipeBuilder::tryToCreateWidenRecipe(Instruction *Instr,
   return tryToWiden(Instr, Operands, VPBB);
 }
 
+// EVL transform doesn't support backends where EVL diffs from RuntimeVF
+// in the second-to-last iteration.
+// Return false if the vector region has recipes relying on
+// RuntimeVF.
+static bool isCompatibleToEVLTransform(VPlan &Plan) {
+  auto HasAnyRuntimeVFUserInLoop = [](VPlan &Plan) -> bool {
+    for (auto &Phi : Plan.getVectorLoopRegion()->getEntryBasicBlock()->phis())
----------------
fhahn wrote:

nit: use any_of? also, what about users of the canonical induction?

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


More information about the llvm-commits mailing list