================
@@ -560,10 +561,17 @@ def AArch64bic : PatFrags<(ops node:$op1, node:$op2),
(and node:$op1, (xor node:$op2, (SVEAllActive))),
(AArch64bic_node node:$op1, node:$op2)]>;
-// Match AND_U with either data operand order, keeping the predicate unchanged.
-def SVEAndU : PatFrags<(ops node:$pg, node:$a, node:$b),
- [(AArch64and_u node:$pg, node:$a, node:$b),
- (AArch64and_u node:$pg, node:$b, node:$a)]>;
+// Match `intr` with either data operand order, keeping the predicate
unchanged.
+class CommPredBinPatFrags<SDPatternOperator intr>
+ : PatFrags<(ops node:$pg, node:$a, node:$b),
+ [(intr node:$pg, node:$a, node:$b),
+ (intr node:$pg, node:$b, node:$a)]>;
+def SVEAndU : CommPredBinPatFrags<AArch64and_u>;
----------------
pvimal816a wrote:
I think for SVEAndU we don't have existing patfrags and we need to define
something like CommPredBinPatFrags that is defined in this PR.
https://github.com/llvm/llvm-project/pull/238442
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits