[llvm] [AArch64][MacroFusion] Fuse only tied AES pairs post-RA (PR #201610)

David Green via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 8 03:24:05 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();
----------------
davemgreen wrote:

Can return true for SecondMI.getOpcode() == AArch64::AESMCrrTied to avoid the need to look at the registers.

https://github.com/llvm/llvm-project/pull/201610


More information about the llvm-commits mailing list