[llvm] [AArch64][SVE] Teach compiler to use information that there are no ac… (PR #68698)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 12 05:11:23 PDT 2023
================
@@ -1169,6 +1169,8 @@ instCombineSVEVectorFuseMulAddSub(InstCombiner &IC, IntrinsicInst &II,
AddendOp = II.getOperand(2);
Mul = II.getOperand(1);
}
+ if (match(P, m_ZeroInt()))
+ return IC.replaceInstUsesWith(II, UndefValue::get(II.getType()));
----------------
paulwalker-arm wrote:
Is this safe? I can see `instCombineSVEVectorFuseMulAddSub` is called by `instCombineSVEVectorFAdd` whose result for an all inactive predicate is defined.
As with calling `instCombineSVEAllActive` you might need to move this functionality into the relevant places that call this function.
https://github.com/llvm/llvm-project/pull/68698
More information about the llvm-commits
mailing list