[llvm] [AArch64][SVE] add missing instcombine x+1 -> x (PR #201851)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 10 09:20:36 PDT 2026
================
@@ -2511,6 +2511,33 @@ instCombineSVEVectorBinOp(InstCombiner &IC, IntrinsicInst &II) {
return IC.replaceInstUsesWith(II, BinOp);
}
+static std::optional<Instruction *> instCombineSVEVectorMla(InstCombiner &IC,
+ IntrinsicInst &II) {
+ bool InactiveLanesAreUndefined =
+ II.getIntrinsicID() == Intrinsic::aarch64_sve_mla_u;
+ Value *Pred = II.getOperand(0);
+ if (!InactiveLanesAreUndefined && !isAllActivePredicate(Pred))
+ return std::nullopt;
----------------
paulwalker-arm wrote:
I just remembered while reviewing your other PR that this is likely unnecessary because we canonicalise `mla(all_active,...` to `mla_u(all_active,...` so you only need to call this function for `aarch64_sve_mla_u`.
https://github.com/llvm/llvm-project/pull/201851
More information about the llvm-commits
mailing list