[llvm] [LV][EVL] Restore inbounds flag in VPVectorEndPointerRecipe when using EVL tail folding (PR #145306)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 23 10:00:04 PDT 2025


================
@@ -2171,6 +2171,29 @@ static VPRecipeBase *createEVLRecipe(VPValue *HeaderMask,
       .Default([&](VPRecipeBase *R) { return nullptr; });
 }
 
+// Replace VF operands with EVL in recipes that use VF.
+static void replaceVFWithEVL(VPValue &VF, VPValue &EVL) {
+  for (VPUser *U : to_vector(VF.users())) {
+    if (auto *VEP = dyn_cast<VPVectorEndPointerRecipe>(U)) {
----------------
alexey-bataev wrote:

Early exit, if the condition is false, to reduce structure complexity?

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


More information about the llvm-commits mailing list