[llvm] [VPlan] Replace EVL branch condition with (branch-on-count AVLNext, 0) (PR #152167)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 25 20:11:55 PDT 2025


================
@@ -2459,6 +2459,20 @@ void VPlanTransforms::canonicalizeEVLLoops(VPlan &Plan) {
 
   VPBasicBlock *HeaderVPBB = EVLPhi->getParent();
   VPValue *EVLIncrement = EVLPhi->getBackedgeValue();
+  VPValue *AVL;
+  if (!match(EVLIncrement,
+             m_c_Add(m_ZExtOrSelf(m_EVL(m_VPValue(AVL))), m_Specific(EVLPhi))))
+    llvm_unreachable("Didn't find AVL?");
----------------
lukel97 wrote:

Done in d8b01f9e3ceb8a23ca0f97c154c75e6654a6e3ac, thanks

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


More information about the llvm-commits mailing list