[llvm-branch-commits] [llvm] [AArch64] Add patterns to combine SVE AND and XOR to BIC (PR #238442)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Nov 17 10:00:00 PST 2026
================
@@ -759,7 +761,19 @@ let Predicates = [HasSVE_or_SME] in {
defm EOR_ZZZ : sve_int_bin_cons_log<0b10, "eor", xor>;
defm BIC_ZZZ : sve_int_bin_cons_log<0b11, "bic", AArch64bic>;
- multiclass SVEAndNotPats<ValueType VT, ValueType PT> {
+ defm ADD_ZPmZ : sve_int_bin_pred_arit_0<0b000, "add", AArch64add_m1, DestructiveBinaryComm>;
+ defm SUB_ZPmZ : sve_int_bin_pred_arit_0<0b001, "sub", AArch64sub_m1, DestructiveBinaryCommWithRev, "SUBR_ZPmZ">;
+ defm SUBR_ZPmZ : sve_int_bin_pred_arit_0<0b011, "subr", AArch64subr_m1, DestructiveBinaryCommWithRev, "SUB_ZPmZ", /*isReverseInstr*/ 1>;
+
+ defm ORR_ZPmZ : sve_int_bin_pred_log<0b000, "orr", AArch64orr_m1, DestructiveBinaryComm>;
+ defm EOR_ZPmZ : sve_int_bin_pred_log<0b001, "eor", AArch64eor_m1, DestructiveBinaryComm>;
+ defm AND_ZPmZ : sve_int_bin_pred_log<0b010, "and", AArch64and_m1, DestructiveBinaryComm>;
+ defm BIC_ZPmZ : sve_int_bin_pred_log<0b011, "bic", int_aarch64_sve_bic, DestructiveBinary>;
+} // End HasSVE_or_SME
+
+// Rewrites specific to selecting BIC_ZZZ.
+let Predicates = [HasSVE_or_SME] in {
----------------
CarolineConcatto wrote:
Is the name convention for classes that have Patterns using '_' or are they all together?
https://github.com/llvm/llvm-project/pull/238442
More information about the llvm-branch-commits
mailing list