@@ -1413,7 +1413,7 @@ instCombineSVEAllOrNoActive(InstCombiner &IC, IntrinsicInst &II,
14131413 Intrinsic::ID IID) {
14141414 if (match (II.getOperand (0 ), m_ZeroInt ())) {
14151415 // llvm_ir, pred(0), op1, op2 - Spec says to return op1 when all lanes are
1416- // inactive for sv[func]_m or sv[func]_z
1416+ // inactive for sv[func]_m
14171417 return IC.replaceInstUsesWith (II, II.getOperand (1 ));
14181418 }
14191419 return instCombineSVEAllActive (II, IID);
@@ -1540,10 +1540,6 @@ static std::optional<Instruction *> instCombineSVEVectorMul(InstCombiner &IC,
15401540 auto *OpMultiplicand = II.getOperand (1 );
15411541 auto *OpMultiplier = II.getOperand (2 );
15421542
1543- if (II.getIntrinsicID () != IID)
1544- if (auto II_U = instCombineSVEAllOrNoActive (IC, II, IID))
1545- return II_U;
1546-
15471543 // Return true if a given instruction is a unit splat value, false otherwise.
15481544 auto IsUnitSplat = [](auto *I) {
15491545 auto *SplatValue = getSplatValue (I);
@@ -1927,6 +1923,10 @@ AArch64TTIImpl::instCombineIntrinsic(InstCombiner &IC,
19271923 case Intrinsic::aarch64_sve_fmls:
19281924 return instCombineSVEAllOrNoActive (IC, II, Intrinsic::aarch64_sve_fmls_u);
19291925 case Intrinsic::aarch64_sve_fmul:
1926+ if (auto II_U =
1927+ instCombineSVEAllOrNoActive (IC, II, Intrinsic::aarch64_sve_fmul_u))
1928+ return II_U;
1929+ return instCombineSVEVectorMul (IC, II, Intrinsic::aarch64_sve_fmul_u);
19301930 case Intrinsic::aarch64_sve_fmul_u:
19311931 return instCombineSVEVectorMul (IC, II, Intrinsic::aarch64_sve_fmul_u);
19321932 case Intrinsic::aarch64_sve_fmulx:
@@ -1950,6 +1950,10 @@ AArch64TTIImpl::instCombineIntrinsic(InstCombiner &IC,
19501950 case Intrinsic::aarch64_sve_mls:
19511951 return instCombineSVEAllOrNoActive (IC, II, Intrinsic::aarch64_sve_mls_u);
19521952 case Intrinsic::aarch64_sve_mul:
1953+ if (auto II_U =
1954+ instCombineSVEAllOrNoActive (IC, II, Intrinsic::aarch64_sve_mul_u))
1955+ return II_U;
1956+ return instCombineSVEVectorMul (IC, II, Intrinsic::aarch64_sve_mul_u);
19531957 case Intrinsic::aarch64_sve_mul_u:
19541958 return instCombineSVEVectorMul (IC, II, Intrinsic::aarch64_sve_mul_u);
19551959 case Intrinsic::aarch64_sve_sabd:
0 commit comments