[llvm] [SME] Stop RA from coalescing COPY instructions that transcend beyond smstart/smstop. (PR #78294)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 30 05:55:43 PST 2024


================
@@ -189,6 +191,26 @@ def : Pat<(int_aarch64_sme_set_tpidr2 i64:$val),
           (MSR 0xde85, GPR64:$val)>;
 def : Pat<(i64 (int_aarch64_sme_get_tpidr2)),
           (MRS 0xde85)>;
+
+multiclass CoalescerBarrierPseudo<RegisterClass rc, list<ValueType> vts> {
+  def NAME : Pseudo<(outs rc:$dst), (ins rc:$idx), []>, Sched<[]> {
+    let Constraints = "$dst = $idx";
+  }
+  foreach vt = vts in {
+    def : Pat<(vt (AArch64CoalescerBarrier (vt rc:$idx))),
+              (!cast<Instruction>(NAME) rc:$idx)>;
+  }
+}
+
+multiclass CoalescerBarriers {
+  defm _FPR16  : CoalescerBarrierPseudo<FPR16, [f16]>;
----------------
david-arm wrote:

What about bf16?

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


More information about the llvm-commits mailing list