[llvm] [AArch64][MacroFusion] Fuse only tied AES pairs post-RA (PR #201610)
Tomer Shafir via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 8 06:01:21 PDT 2026
================
@@ -117,6 +117,18 @@ static bool isArithmeticCbzPair(const MachineInstr *FirstMI,
return false;
}
+// True unless the pair provably writes different physical registers. Pre-RA
+// the dests are still virtual, and post-RA it requires a genuine WAW (same dest
+// reg).
+static bool mayHaveWAWDependency(const MachineInstr &FirstMI,
+ const MachineInstr &SecondMI) {
+ Register DestFirst = FirstMI.getOperand(0).getReg();
----------------
tomershafir wrote:
That would shift the extra cost from register lookup pre-RA to extra opcode check post-RA, I think it makes sense. I do want to keep the helper generic for further usage, so Ill prepend the check in the caller and make the "may" an assert for now (until we really need "may").
https://github.com/llvm/llvm-project/pull/201610
More information about the llvm-commits
mailing list