@@ -1413,7 +1413,7 @@ instCombineSVEAllOrNoActive(InstCombiner &IC, IntrinsicInst &II,
1413
1413
Intrinsic::ID IID) {
1414
1414
if (match (II.getOperand (0 ), m_ZeroInt ())) {
1415
1415
// 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
1417
1417
return IC.replaceInstUsesWith (II, II.getOperand (1 ));
1418
1418
}
1419
1419
return instCombineSVEAllActive (II, IID);
@@ -1540,10 +1540,6 @@ static std::optional<Instruction *> instCombineSVEVectorMul(InstCombiner &IC,
1540
1540
auto *OpMultiplicand = II.getOperand (1 );
1541
1541
auto *OpMultiplier = II.getOperand (2 );
1542
1542
1543
- if (II.getIntrinsicID () != IID)
1544
- if (auto II_U = instCombineSVEAllOrNoActive (IC, II, IID))
1545
- return II_U;
1546
-
1547
1543
// Return true if a given instruction is a unit splat value, false otherwise.
1548
1544
auto IsUnitSplat = [](auto *I) {
1549
1545
auto *SplatValue = getSplatValue (I);
@@ -1927,6 +1923,10 @@ AArch64TTIImpl::instCombineIntrinsic(InstCombiner &IC,
1927
1923
case Intrinsic::aarch64_sve_fmls:
1928
1924
return instCombineSVEAllOrNoActive (IC, II, Intrinsic::aarch64_sve_fmls_u);
1929
1925
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);
1930
1930
case Intrinsic::aarch64_sve_fmul_u:
1931
1931
return instCombineSVEVectorMul (IC, II, Intrinsic::aarch64_sve_fmul_u);
1932
1932
case Intrinsic::aarch64_sve_fmulx:
@@ -1950,6 +1950,10 @@ AArch64TTIImpl::instCombineIntrinsic(InstCombiner &IC,
1950
1950
case Intrinsic::aarch64_sve_mls:
1951
1951
return instCombineSVEAllOrNoActive (IC, II, Intrinsic::aarch64_sve_mls_u);
1952
1952
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);
1953
1957
case Intrinsic::aarch64_sve_mul_u:
1954
1958
return instCombineSVEVectorMul (IC, II, Intrinsic::aarch64_sve_mul_u);
1955
1959
case Intrinsic::aarch64_sve_sabd:
0 commit comments