[llvm] [TableGen][MacroFusion] Predicate if the first inst has the same register (PR #137778)
Pengcheng Wang via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 29 23:30:28 PDT 2025
================
@@ -55,11 +55,20 @@ class TieReg<int firstOpIdx, int secondOpIdx> : BothFusionPredicate {
int SecondOpIdx = secondOpIdx;
}
+// The operand of `FirstMI` at position `firstOpIdx` should be the same as the
+// operand at position `secondOpIdx`.
+// If the fusion has `IsCommutable` being true and the operand at `secondOpIdx`
+// has commutable operand, then the commutable operand will be checked too.
+class FirstSameReg<int firstOpIdx, int secondOpIdx> : FirstFusionPredicate {
----------------
wangpc-pp wrote:
It means it will be applied the first instruction. The naming logic is the same as others classes, or we have to rename all others.
https://github.com/llvm/llvm-project/pull/137778
More information about the llvm-commits
mailing list