[llvm] [AArch64] Fold four and eight way partial reductions with [SU]ADDLP (PR #214636)

Adam Scott via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 04:02:47 PDT 2026


================
@@ -19082,6 +19095,12 @@ bool AArch64TargetLowering::optimizeExtendOrTruncateConversion(
                       m_Intrinsic<Intrinsic::vector_partial_reduce_add>(
                           m_Value(), m_Specific(I))))
               return true;
+            if (match(SingleUser,
+                      m_c_Mul(m_Specific(I), m_ZExtOrSExt(m_Value()))) &&
+                SingleUser->hasOneUse() &&
+                match(SingleUser->user_back(),
+                      m_Intrinsic<Intrinsic::vector_partial_reduce_add>()))
+              return true;
----------------
as4230 wrote:

Sorry for the delay! I've been busy... I do still want to get to this, and I also need to update the cost model for the merged change. I already have both of those follow-up patches locally, so if you can give me until the weekend I can get it posted. If this is blocking you though, please feel free to take it

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


More information about the llvm-commits mailing list