[llvm] [AArch64][SVE] Teach compiler to use information that there are no ac… (PR #68698)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 13 04:07:08 PDT 2023
================
@@ -1301,9 +1303,26 @@ static std::optional<Instruction *> instCombineSVEAllActive(IntrinsicInst &II,
return &II;
}
+// Optimize operations that take an all false predicate or send them for
+// canonicalization.
+static std::optional<Instruction *>
+instCombineSVEAllOrNoActive(InstCombiner &IC, IntrinsicInst &II,
+ Intrinsic::ID IID) {
+ if (match(II.getOperand(0), m_ZeroInt())) {
+ if (II.getIntrinsicID() != IID)
----------------
CarolineConcatto wrote:
nit: maybe add a comments
// llvm_ir, pred(0), op1, op2 - Spec says to return op1 when all lanes are inactive for sv[func]_m or sv[func]_z
https://github.com/llvm/llvm-project/pull/68698
More information about the llvm-commits
mailing list