[llvm] [AArch64PostCoalescer] Propagate undef flag after replacing (PR #163119)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 14 18:27:33 PDT 2025


================
@@ -0,0 +1,35 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 6
+# RUN: llc -mtriple=aarch64 -mattr=+sme -run-pass=aarch64-post-coalescer-pass -o - %s | FileCheck %s
+
+--- |
+  declare void @foo(double) "aarch64_pstate_sm_enabled"
+
+  define dso_local void @bar(double %a) local_unnamed_addr {
+  entry:
+    tail call void @foo(double poison) "aarch64_pstate_sm_enabled"
+    ret void
+  }
+...
+---
+name:            bar
+machineFunctionInfo:
+  hasStreamingModeChanges: true
+body:             |
+  bb.0.entry:
+    ; CHECK-LABEL: name: bar
+    ; CHECK: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
+    ; CHECK-NEXT: MSRpstatesvcrImm1 1, 1, csr_aarch64_smstartstop, implicit-def dead $nzcv, implicit-def $sp, implicit-def dead $d0, implicit $vg, implicit-def $vg, implicit-def $fpmr
+    ; CHECK-NEXT: $d0 = COPY undef %0:fpr64
+    ; CHECK-NEXT: BL @foo, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit killed $d0, implicit-def $sp
+    ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
+    ; CHECK-NEXT: MSRpstatesvcrImm1 1, 0, csr_aarch64_smstartstop, implicit-def dead $nzcv, implicit $vg, implicit-def $vg, implicit-def $fpmr
+    ; CHECK-NEXT: RET_ReallyLR
+    ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
+    %1:fpr64 = COALESCER_BARRIER_FPR64 undef %1
----------------
XiaShark wrote:

It's fine, modified

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


More information about the llvm-commits mailing list