[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
Mon May 12 02:14:12 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:
I renamed it to `FirstInstHasSameReg`.
https://github.com/llvm/llvm-project/pull/137778
More information about the llvm-commits
mailing list