[llvm] [AArch64] Add SVE patterns for [su]adalp with separate ADD. (PR #204796)
Gaƫtan Bossu via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 2 02:15:26 PDT 2026
================
@@ -2598,6 +2598,31 @@ instCombineSVEVectorMlaU(InstCombiner &IC, IntrinsicInst &II) {
return std::nullopt;
}
+static std::optional<Instruction *>
+instCombineSVEPairwiseAddLong(InstCombiner &IC, IntrinsicInst &II) {
+ assert((II.getIntrinsicID() == Intrinsic::aarch64_sve_sadalp ||
+ II.getIntrinsicID() == Intrinsic::aarch64_sve_uadalp) &&
+ "Expected SADALP or UADALP intrinsic");
+
+ // We are looking for add(adalp(%pred, zeroinitializer, %in), %acc)
+ if (!II.hasOneUse() || !match(II.getArgOperand(1), m_Zero()))
+ return std::nullopt;
+
+ auto *User = dyn_cast<Instruction>(*II.user_begin());
+ Value *Acc;
+ if (!User || !match(User, m_c_Add(m_Specific(&II), m_Value(Acc))))
----------------
gbossu wrote:
I was more concerned about the fact the the only user might not be an `Instruction`, but I doubt we'll get an `Operator` use of our intrinsic.
https://github.com/llvm/llvm-project/pull/204796
More information about the llvm-commits
mailing list