llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-aarch64

Author: Benjamin Maxwell (MacDue)

<details>
<summary>Changes</summary>

The previous SelectionDAG lowering is still available via 
`-aarch64-new-sme-abi=false` (this will stay around until at least LLVM 23).

In tests that contained `CHECK-NEWLOWERING` the checks have been updated so:

* `CHECK-NEWLOWERING` -&gt; `CHECK` (the new default)
* `CHECK` -&gt; `CHECK-SDAG` (the old SelectionDAG lowering)

But otherwise, the check lines have not changed.

Tests that were not explicitly checking the SME lowering have been updated to 
match the new default lowering.

Those tests are:

* llvm/test/CodeGen/AArch64/O0-pipeline.ll
* llvm/test/CodeGen/AArch64/O3-pipeline.ll
* llvm/test/CodeGen/AArch64/sme-disable-gisel-fisel.ll
* llvm/test/CodeGen/AArch64/sme-framelower-use-bp.ll
* llvm/test/CodeGen/AArch64/stack-hazard.ll

---

Patch is 198.06 KiB, truncated to 20.00 KiB below, full version: 
https://github.com/llvm/llvm-project/pull/172642.diff


16 Files Affected:

- (modified) clang/test/CodeGen/AArch64/sme-remarks.c (+14-14) 
- (modified) llvm/lib/Target/AArch64/AArch64TargetMachine.cpp (+1-1) 
- (modified) llvm/test/CodeGen/AArch64/O0-pipeline.ll (+4-1) 
- (modified) llvm/test/CodeGen/AArch64/O3-pipeline.ll (+4-3) 
- (modified) llvm/test/CodeGen/AArch64/sme-abi-save-call-remarks.ll (+34-34) 
- (modified) llvm/test/CodeGen/AArch64/sme-agnostic-za.ll (+183-183) 
- (modified) llvm/test/CodeGen/AArch64/sme-disable-gisel-fisel.ll (+20-21) 
- (modified) llvm/test/CodeGen/AArch64/sme-framelower-use-bp.ll (+296-612) 
- (modified) llvm/test/CodeGen/AArch64/sme-lazy-save-call.ll (+282-282) 
- (modified) llvm/test/CodeGen/AArch64/sme-new-za-function.ll (+112-112) 
- (modified) llvm/test/CodeGen/AArch64/sme-za-control-flow.ll (+330-330) 
- (modified) llvm/test/CodeGen/AArch64/sme-za-exceptions.ll (+2-2) 
- (modified) llvm/test/CodeGen/AArch64/sme-za-lazy-save-buffer.ll (+53-53) 
- (modified) llvm/test/CodeGen/AArch64/sme-zt0-state.ll (+168-168) 
- (modified) llvm/test/CodeGen/AArch64/stack-hazard.ll (+5-5) 
- (modified) llvm/test/CodeGen/AArch64/sve-stack-frame-layout.ll (+73-73) 


``````````diff
diff --git a/clang/test/CodeGen/AArch64/sme-remarks.c 
b/clang/test/CodeGen/AArch64/sme-remarks.c
index fd144b8a6c425..f7a1f33f3372d 100644
--- a/clang/test/CodeGen/AArch64/sme-remarks.c
+++ b/clang/test/CodeGen/AArch64/sme-remarks.c
@@ -1,39 +1,39 @@
 // REQUIRES: aarch64-registered-target
 
-// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -Rpass-analysis=sme 
-verify %s -S -o /dev/null
-// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -mllvm 
-aarch64-new-sme-abi -Rpass-analysis=sme -verify=expected-new %s -S -o 
/dev/null %s
+// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -mllvm 
-aarch64-new-sme-abi=false -Rpass-analysis=sme -verify=expected-sdag %s -S -o 
/dev/null
+// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -Rpass-analysis=sme 
-verify %s -S -o /dev/null %s
 
 void private_za_callee_a();
 void private_za_callee_b();
 void private_za_callee_c();
 
 void test_za_merge_paths(int a) __arm_inout("za") {
-  // expected-new-remark@+1 {{lazy save of ZA emitted in 
'test_za_merge_paths'}}
+  // expected-remark@+1 {{lazy save of ZA emitted in 'test_za_merge_paths'}}
   if (a != 0)
-    // expected-remark@+2 {{call from 'test_za_merge_paths' to 'unknown 
callee' sets up a lazy save for ZA}}
-    // expected-new-remark@+1 {{call to 'private_za_callee_a' requires ZA 
save}}
+    // expected-sdag-remark@+2 {{call from 'test_za_merge_paths' to 'unknown 
callee' sets up a lazy save for ZA}}
+    // expected-remark@+1 {{call to 'private_za_callee_a' requires ZA save}}
     private_za_callee_a();
   else
-    // expected-remark@+2 {{call from 'test_za_merge_paths' to 'unknown 
callee' sets up a lazy save for ZA}}
-    // expected-new-remark@+1 {{call to 'private_za_callee_b' requires ZA 
save}}
+    // expected-sdag-remark@+2 {{call from 'test_za_merge_paths' to 'unknown 
callee' sets up a lazy save for ZA}}
+    // expected-remark@+1 {{call to 'private_za_callee_b' requires ZA save}}
     private_za_callee_b();
-  // expected-remark@+3 {{call from 'test_za_merge_paths' to 'unknown callee' 
sets up a lazy save for ZA}}
+  // expected-sdag-remark@+3 {{call from 'test_za_merge_paths' to 'unknown 
callee' sets up a lazy save for ZA}}
   /// The new lowering won't report this call as the save is already needed due
   /// to the call to `private_za_callee_a/b()` calls on both paths to this 
call.
   private_za_callee_c();
 }
 
 void test_lazy_save_multiple_paths(int a) __arm_inout("za") {
-  // expected-new-remark@+1 {{lazy save of ZA emitted in 
'test_lazy_save_multiple_paths'}}
+  // expected-remark@+1 {{lazy save of ZA emitted in 
'test_lazy_save_multiple_paths'}}
   if (a != 0)
-    // expected-remark@+2 {{call from 'test_lazy_save_multiple_paths' to 
'unknown callee' sets up a lazy save for ZA}}
-    // expected-new-remark@+1 {{call to 'private_za_callee_a' requires ZA 
save}}
+    // expected-sdag-remark@+2 {{call from 'test_lazy_save_multiple_paths' to 
'unknown callee' sets up a lazy save for ZA}}
+    // expected-remark@+1 {{call to 'private_za_callee_a' requires ZA save}}
     private_za_callee_a();
   else {
-    // expected-remark@+2 {{call from 'test_lazy_save_multiple_paths' to 
'unknown callee' sets up a lazy save for ZA}}
-    // expected-new-remark@+1 {{call to 'private_za_callee_b' requires ZA 
save}}
+    // expected-sdag-remark@+2 {{call from 'test_lazy_save_multiple_paths' to 
'unknown callee' sets up a lazy save for ZA}}
+    // expected-remark@+1 {{call to 'private_za_callee_b' requires ZA save}}
     private_za_callee_b();
-    // expected-remark@+3 {{call from 'test_lazy_save_multiple_paths' to 
'unknown callee' sets up a lazy save for ZA}}
+    // expected-sdag-remark@+3 {{call from 'test_lazy_save_multiple_paths' to 
'unknown callee' sets up a lazy save for ZA}}
     /// The new lowering won't report this call as the save is already needed
     /// due to the call to `private_za_callee_b()`.
     private_za_callee_c();
diff --git a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp 
b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
index 346e18e553c5e..1ec5a20cc0ce0 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
@@ -225,7 +225,7 @@ static cl::opt<bool>
 static cl::opt<bool>
     EnableNewSMEABILowering("aarch64-new-sme-abi",
                             cl::desc("Enable new lowering for the SME ABI"),
-                            cl::init(false), cl::Hidden);
+                            cl::init(true), cl::Hidden);
 
 extern "C" LLVM_ABI LLVM_EXTERNAL_VISIBILITY void
 LLVMInitializeAArch64Target() {
diff --git a/llvm/test/CodeGen/AArch64/O0-pipeline.ll 
b/llvm/test/CodeGen/AArch64/O0-pipeline.ll
index 96f5e5a4afb3e..80ff4fbb11a8f 100644
--- a/llvm/test/CodeGen/AArch64/O0-pipeline.ll
+++ b/llvm/test/CodeGen/AArch64/O0-pipeline.ll
@@ -33,7 +33,6 @@
 ; CHECK-NEXT:       Lazy Block Frequency Analysis
 ; CHECK-NEXT:       Optimization Remark Emitter
 ; CHECK-NEXT:       AArch64 Stack Tagging
-; CHECK-NEXT:       SME ABI Pass
 ; CHECK-NEXT:       Exception handling preparation
 ; CHECK-NEXT:       Prepare callbr
 ; CHECK-NEXT:       Safe Stack instrumentation pass
@@ -56,6 +55,10 @@
 ; CHECK-NEXT:       AArch64 Instruction Selection
 ; CHECK-NEXT:       Finalize ISel and expand pseudo-instructions
 ; CHECK-NEXT:       Local Stack Slot Allocation
+; CHECK-NEXT:       Bundle Machine CFG Edges
+; CHECK-NEXT:       Lazy Machine Block Frequency Analysis
+; CHECK-NEXT:       Machine Optimization Remark Emitter
+; CHECK-NEXT:       Machine SME ABI pass
 ; CHECK-NEXT:       Eliminate PHI nodes for register allocation
 ; CHECK-NEXT:       Two-Address instruction pass
 ; CHECK-NEXT:       Fast Register Allocator
diff --git a/llvm/test/CodeGen/AArch64/O3-pipeline.ll 
b/llvm/test/CodeGen/AArch64/O3-pipeline.ll
index e8ea55e027aec..15266b0d6a916 100644
--- a/llvm/test/CodeGen/AArch64/O3-pipeline.ll
+++ b/llvm/test/CodeGen/AArch64/O3-pipeline.ll
@@ -97,8 +97,6 @@
 ; CHECK-NEXT:       Interleaved Load Combine Pass
 ; CHECK-NEXT:       Dominator Tree Construction
 ; CHECK-NEXT:       Interleaved Access Pass
-; CHECK-NEXT:       SME ABI Pass
-; CHECK-NEXT:       Dominator Tree Construction
 ; CHECK-NEXT:       Natural Loop Information
 ; CHECK-NEXT:       Type Promotion
 ; CHECK-NEXT:       CodeGen Prepare
@@ -129,8 +127,11 @@
 ; CHECK-NEXT:       MachineDominator Tree Construction
 ; CHECK-NEXT:       AArch64 Local Dynamic TLS Access Clean-up
 ; CHECK-NEXT:       Finalize ISel and expand pseudo-instructions
-; CHECK-NEXT:       SME Peephole Optimization pass
+; CHECK-NEXT:       Bundle Machine CFG Edges
 ; CHECK-NEXT:       Lazy Machine Block Frequency Analysis
+; CHECK-NEXT:       Machine Optimization Remark Emitter
+; CHECK-NEXT:       Machine SME ABI pass
+; CHECK-NEXT:       SME Peephole Optimization pass
 ; CHECK-NEXT:       Early Tail Duplication
 ; CHECK-NEXT:       Optimize machine instruction PHIs
 ; CHECK-NEXT:       Slot index numbering
diff --git a/llvm/test/CodeGen/AArch64/sme-abi-save-call-remarks.ll 
b/llvm/test/CodeGen/AArch64/sme-abi-save-call-remarks.ll
index 755dcfbf17ba4..c3c76e3e803d0 100644
--- a/llvm/test/CodeGen/AArch64/sme-abi-save-call-remarks.ll
+++ b/llvm/test/CodeGen/AArch64/sme-abi-save-call-remarks.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -mtriple=aarch64 -mattr=+sme2 --aarch64-new-sme-abi=false 
--pass-remarks-analysis=sme -o /dev/null < %s 2>&1 | FileCheck %s  
--check-prefix=CHECK-SDAG
 ; RUN: llc -mtriple=aarch64 -mattr=+sme2 --pass-remarks-analysis=sme -o 
/dev/null < %s 2>&1 | FileCheck %s
-; RUN: llc -mtriple=aarch64 -mattr=+sme2 --aarch64-new-sme-abi 
--pass-remarks-analysis=sme -o /dev/null < %s 2>&1 | FileCheck %s 
--check-prefix=CHECK-NEWLOWERING
 
 declare void @private_za_callee()
 declare void @private_za_callee_a()
@@ -13,42 +13,42 @@ declare void @shared_za_zt0_callee() "aarch64_inout_za" 
"aarch64_inout_zt0"
 ; Note: These remarks are more useful with source debug info (which gives line 
numbers for `<unknown>:0:0`).
 
 define void @test_lazy_save_1_callee() nounwind "aarch64_inout_za" {
-; CHECK: remark: <unknown>:0:0: call from 'test_lazy_save_1_callee' to 
'private_za_callee' sets up a lazy save for ZA
+; CHECK-SDAG: remark: <unknown>:0:0: call from 'test_lazy_save_1_callee' to 
'private_za_callee' sets up a lazy save for ZA
 
-; CHECK-NEWLOWERING:      remark: <unknown>:0:0: lazy save of ZA emitted in 
'test_lazy_save_1_callee'
-; CHECK-NEWLOWERING-NEXT: remark: <unknown>:0:0: call to 'private_za_callee' 
requires ZA save
+; CHECK:      remark: <unknown>:0:0: lazy save of ZA emitted in 
'test_lazy_save_1_callee'
+; CHECK-NEXT: remark: <unknown>:0:0: call to 'private_za_callee' requires ZA 
save
   call void @private_za_callee()
   ret void
 }
 
 define void @test_lazy_save_2_callees() nounwind "aarch64_inout_za" {
-; CHECK: remark: <unknown>:0:0: call from 'test_lazy_save_2_callees' to 
'private_za_callee' sets up a lazy save for ZA
-; CHECK: remark: <unknown>:0:0: call from 'test_lazy_save_2_callees' to 
'private_za_callee' sets up a lazy save for ZA
+; CHECK-SDAG: remark: <unknown>:0:0: call from 'test_lazy_save_2_callees' to 
'private_za_callee' sets up a lazy save for ZA
+; CHECK-SDAG: remark: <unknown>:0:0: call from 'test_lazy_save_2_callees' to 
'private_za_callee' sets up a lazy save for ZA
 
-; CHECK-NEWLOWERING:      remark: <unknown>:0:0: lazy save of ZA emitted in 
'test_lazy_save_2_callees'
-; CHECK-NEWLOWERING-NEXT: remark: <unknown>:0:0: call to 'private_za_callee' 
requires ZA save
+; CHECK:      remark: <unknown>:0:0: lazy save of ZA emitted in 
'test_lazy_save_2_callees'
+; CHECK-NEXT: remark: <unknown>:0:0: call to 'private_za_callee' requires ZA 
save
   call void @private_za_callee()
   call void @private_za_callee()
   ret void
 }
 
 define float @test_lazy_save_expanded_intrinsic(float %a) nounwind 
"aarch64_inout_za" {
-; CHECK: remark: <unknown>:0:0: call from 'test_lazy_save_expanded_intrinsic' 
to 'cosf' sets up a lazy save for ZA
+; CHECK-SDAG: remark: <unknown>:0:0: call from 
'test_lazy_save_expanded_intrinsic' to 'cosf' sets up a lazy save for ZA
 
-; CHECK-NEWLOWERING:      remark: <unknown>:0:0: lazy save of ZA emitted in 
'test_lazy_save_expanded_intrinsic'
-; CHECK-NEWLOWERING-NEXT: remark: <unknown>:0:0: call to 'cosf' requires ZA 
save
+; CHECK:      remark: <unknown>:0:0: lazy save of ZA emitted in 
'test_lazy_save_expanded_intrinsic'
+; CHECK-NEXT: remark: <unknown>:0:0: call to 'cosf' requires ZA save
   %res = call float @llvm.cos.f32(float %a)
   ret float %res
 }
 
 define void @test_lazy_save_multiple_paths(i1 %a) "aarch64_inout_za" {
-; CHECK: remark: <unknown>:0:0: call from 'test_lazy_save_multiple_paths' to 
'private_za_callee_a' sets up a lazy save for ZA
-; CHECK: remark: <unknown>:0:0: call from 'test_lazy_save_multiple_paths' to 
'private_za_callee_b' sets up a lazy save for ZA
-; CHECK: remark: <unknown>:0:0: call from 'test_lazy_save_multiple_paths' to 
'private_za_callee_c' sets up a lazy save for ZA
+; CHECK-SDAG: remark: <unknown>:0:0: call from 'test_lazy_save_multiple_paths' 
to 'private_za_callee_a' sets up a lazy save for ZA
+; CHECK-SDAG: remark: <unknown>:0:0: call from 'test_lazy_save_multiple_paths' 
to 'private_za_callee_b' sets up a lazy save for ZA
+; CHECK-SDAG: remark: <unknown>:0:0: call from 'test_lazy_save_multiple_paths' 
to 'private_za_callee_c' sets up a lazy save for ZA
 
-;      CHECK-NEWLOWERING: remark: <unknown>:0:0: lazy save of ZA emitted in 
'test_lazy_save_multiple_paths'
-; CHECK-NEWLOWERING-NEXT: remark: <unknown>:0:0: call to 'private_za_callee_b' 
requires ZA save
-; CHECK-NEWLOWERING-NEXT: remark: <unknown>:0:0: call to 'private_za_callee_a' 
requires ZA save
+;      CHECK: remark: <unknown>:0:0: lazy save of ZA emitted in 
'test_lazy_save_multiple_paths'
+; CHECK-NEXT: remark: <unknown>:0:0: call to 'private_za_callee_b' requires ZA 
save
+; CHECK-NEXT: remark: <unknown>:0:0: call to 'private_za_callee_a' requires ZA 
save
 entry:
   br i1 %a, label %if.end, label %if.else
 
@@ -67,12 +67,12 @@ if.end:
 
 define void @test_lazy_save_with_zt0() "aarch64_inout_za" "aarch64_inout_zt0"
 {
-; CHECK: remark: <unknown>:0:0: call from 'test_lazy_save_with_zt0' to 
'private_za_callee' sets up a lazy save for ZA
+; CHECK-SDAG: remark: <unknown>:0:0: call from 'test_lazy_save_with_zt0' to 
'private_za_callee' sets up a lazy save for ZA
 
-;      CHECK-NEWLOWERING: remark: <unknown>:0:0: spill of ZT0 emitted in 
'test_lazy_save_with_zt0'
-; CHECK-NEWLOWERING-NEXT: remark: <unknown>:0:0: call to 'shared_za_callee' 
requires ZT0 save
-; CHECK-NEWLOWERING-NEXT: remark: <unknown>:0:0: lazy save of ZA emitted in 
'test_lazy_save_with_zt0'
-; CHECK-NEWLOWERING-NEXT: remark: <unknown>:0:0: call to 'private_za_callee' 
requires ZA save
+;      CHECK: remark: <unknown>:0:0: spill of ZT0 emitted in 
'test_lazy_save_with_zt0'
+; CHECK-NEXT: remark: <unknown>:0:0: call to 'shared_za_callee' requires ZT0 
save
+; CHECK-NEXT: remark: <unknown>:0:0: lazy save of ZA emitted in 
'test_lazy_save_with_zt0'
+; CHECK-NEXT: remark: <unknown>:0:0: call to 'private_za_callee' requires ZA 
save
   call void @shared_za_callee()   ; Save ZT0 (remark ZT0 spill)
   call void @private_za_callee()  ; Save ZA  (remark ZA save)
   ret void
@@ -80,13 +80,13 @@ define void @test_lazy_save_with_zt0() "aarch64_inout_za" 
"aarch64_inout_zt0"
 
 define void @test_lazy_save_with_zt0_reload() "aarch64_inout_za" 
"aarch64_inout_zt0"
 {
-; CHECK: remark: <unknown>:0:0: call from 'test_lazy_save_with_zt0_reload' to 
'private_za_callee' sets up a lazy save for ZA
+; CHECK-SDAG: remark: <unknown>:0:0: call from 
'test_lazy_save_with_zt0_reload' to 'private_za_callee' sets up a lazy save for 
ZA
 
-;      CHECK-NEWLOWERING: remark: <unknown>:0:0: spill of ZT0 emitted in 
'test_lazy_save_with_zt0_reload'
-; CHECK-NEWLOWERING-NEXT: remark: <unknown>:0:0: call to 'shared_za_callee' 
requires ZT0 save
-; CHECK-NEWLOWERING-NEXT: remark: <unknown>:0:0: spill of ZT0 emitted in 
'test_lazy_save_with_zt0_reload'
-; CHECK-NEWLOWERING-NEXT: remark: <unknown>:0:0: lazy save of ZA emitted in 
'test_lazy_save_with_zt0_reload'
-; CHECK-NEWLOWERING-NEXT: remark: <unknown>:0:0: call to 'private_za_callee' 
requires ZA save
+;      CHECK: remark: <unknown>:0:0: spill of ZT0 emitted in 
'test_lazy_save_with_zt0_reload'
+; CHECK-NEXT: remark: <unknown>:0:0: call to 'shared_za_callee' requires ZT0 
save
+; CHECK-NEXT: remark: <unknown>:0:0: spill of ZT0 emitted in 
'test_lazy_save_with_zt0_reload'
+; CHECK-NEXT: remark: <unknown>:0:0: lazy save of ZA emitted in 
'test_lazy_save_with_zt0_reload'
+; CHECK-NEXT: remark: <unknown>:0:0: call to 'private_za_callee' requires ZA 
save
   call void @shared_za_callee()      ; Save ZT0 (remark ZT0 spill)
   call void @shared_za_zt0_callee()  ; Reload ZT0
   call void @private_za_callee()     ; Save ZA, ZT0 (remark ZT0 spill and ZA 
save)
@@ -96,9 +96,9 @@ define void @test_lazy_save_with_zt0_reload() 
"aarch64_inout_za" "aarch64_inout_
 define void @test_za_merge_paths(i1 %a) "aarch64_za_state_agnostic" {
 ;; Note: The old lowering does not emit any remarks for agnostic ZA saves.
 
-;      CHECK-NEWLOWERING: remark: <unknown>:0:0: full save of ZA emitted in 
'test_za_merge_paths'
-; CHECK-NEWLOWERING-NEXT: remark: <unknown>:0:0: call to 'private_za_callee_b' 
requires ZA save
-; CHECK-NEWLOWERING-NEXT: remark: <unknown>:0:0: call to 'private_za_callee_a' 
requires ZA save
+;      CHECK: remark: <unknown>:0:0: full save of ZA emitted in 
'test_za_merge_paths'
+; CHECK-NEXT: remark: <unknown>:0:0: call to 'private_za_callee_b' requires ZA 
save
+; CHECK-NEXT: remark: <unknown>:0:0: call to 'private_za_callee_a' requires ZA 
save
 entry:
   br i1 %a, label %if.end, label %if.else
 
@@ -119,10 +119,10 @@ exit:
 }
 
 define void @test_lazy_save_function_ptr_callee(ptr %private_za_callee) 
nounwind "aarch64_inout_za" {
-; CHECK: remark: <unknown>:0:0: call from 'test_lazy_save_function_ptr_callee' 
to 'unknown callee' sets up a lazy save for ZA
+; CHECK-SDAG: remark: <unknown>:0:0: call from 
'test_lazy_save_function_ptr_callee' to 'unknown callee' sets up a lazy save 
for ZA
 
-; CHECK-NEWLOWERING:      remark: <unknown>:0:0: lazy save of ZA emitted in 
'test_lazy_save_function_ptr_callee'
-; CHECK-NEWLOWERING-NEXT: remark: <unknown>:0:0: call requires ZA save
+; CHECK:      remark: <unknown>:0:0: lazy save of ZA emitted in 
'test_lazy_save_function_ptr_callee'
+; CHECK-NEXT: remark: <unknown>:0:0: call requires ZA save
   call void %private_za_callee()
   ret void
 }
diff --git a/llvm/test/CodeGen/AArch64/sme-agnostic-za.ll 
b/llvm/test/CodeGen/AArch64/sme-agnostic-za.ll
index 0906e10b551b7..344f1ef24b843 100644
--- a/llvm/test/CodeGen/AArch64/sme-agnostic-za.ll
+++ b/llvm/test/CodeGen/AArch64/sme-agnostic-za.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 
UTC_ARGS: --version 5
+; RUN: llc -mattr=+sme2 < %s -aarch64-new-sme-abi=false | FileCheck %s 
--check-prefixes=CHECK-COMMON,CHECK-SDAG
 ; RUN: llc -mattr=+sme2 < %s | FileCheck %s --check-prefixes=CHECK-COMMON,CHECK
-; RUN: llc -mattr=+sme2 < %s -aarch64-new-sme-abi | FileCheck %s 
--check-prefixes=CHECK-COMMON,CHECK-NEWLOWERING
 
 target triple = "aarch64"
 
@@ -24,6 +24,35 @@ define i64 @agnostic_caller_no_callees(ptr %ptr) nounwind 
"aarch64_za_state_agno
 ; inserted for calls to non-agnostic functions and that the arg/result 
registers are
 ; preserved by the register allocator.
 define i64 @agnostic_caller_private_za_callee(i64 %v) nounwind 
"aarch64_za_state_agnostic" {
+; CHECK-SDAG-LABEL: agnostic_caller_private_za_callee:
+; CHECK-SDAG:       // %bb.0:
+; CHECK-SDAG-NEXT:    stp x29, x30, [sp, #-32]! // 16-byte Folded Spill
+; CHECK-SDAG-NEXT:    str x19, [sp, #16] // 8-byte Spill
+; CHECK-SDAG-NEXT:    mov x29, sp
+; CHECK-SDAG-NEXT:    mov x8, x0
+; CHECK-SDAG-NEXT:    bl __arm_sme_state_size
+; CHECK-SDAG-NEXT:    sub sp, sp, x0
+; CHECK-SDAG-NEXT:    mov x19, sp
+; CHECK-SDAG-NEXT:    mov x0, x19
+; CHECK-SDAG-NEXT:    bl __arm_sme_save
+; CHECK-SDAG-NEXT:    mov x0, x8
+; CHECK-SDAG-NEXT:    bl private_za_decl
+; CHECK-SDAG-NEXT:    mov x1, x0
+; CHECK-SDAG-NEXT:    mov x0, x19
+; CHECK-SDAG-NEXT:    bl __arm_sme_restore
+; CHECK-SDAG-NEXT:    mov x0, x19
+; CHECK-SDAG-NEXT:    bl __arm_sme_save
+; CHECK-SDAG-NEXT:    mov x0, x1
+; CHECK-SDAG-NEXT:    bl private_za_decl
+; CHECK-SDAG-NEXT:    mov x1, x0
+; CHECK-SDAG-NEXT:    mov x0, x19
+; CHECK-SDAG-NEXT:    bl __arm_sme_restore
+; CHECK-SDAG-NEXT:    mov x0, x1
+; CHECK-SDAG-NEXT:    mov sp, x29
+; CHECK-SDAG-NEXT:    ldr x19, [sp, #16] // 8-byte Reload
+; CHECK-SDAG-NEXT:    ldp x29, x30, [sp], #32 // 16-byte Folded Reload
+; CHECK-SDAG-NEXT:    ret
+;
 ; CHECK-LABEL: agnostic_caller_private_za_callee:
 ; CHECK:       // %bb.0:
 ; CHECK-NEXT:    stp x29, x30, [sp, #-32]! // 16-byte Folded Spill
@@ -37,12 +66,6 @@ define i64 @agnostic_caller_private_za_callee(i64 %v) 
nounwind "aarch64_za_state
 ; CHECK-NEXT:    bl __arm_sme_save
 ; CHECK-NEXT:    mov x0, x8
 ; CHECK-NEXT:    bl private_za_decl
-; CHECK-NEXT:    mov x1, x0
-; CHECK-NEXT:    mov x0, x19
-; CHECK-NEXT:    bl __arm_sme_restore
-; CHECK-NEXT:    mov x0, x19
-; CHECK-NEXT:    bl __arm_sme_save
-; CHECK-NEXT:    mov x0, x1
 ; CHECK-NEXT:    bl private_za_decl
 ; CHECK-NEXT:    mov x1, x0
 ; CHECK-NEXT:    mov x0, x19
@@ -52,29 +75,6 @@ define i64 @agnostic_caller_private_za_callee(i64 %v) 
nounwind "aarch64_za_state
 ; CHECK-NEXT:    ldr x19, [sp, #16] // 8-byte Reload
 ; CHECK-NEXT:    ldp x29, x30, [sp], #32 // 16-byte Folded Reload
 ; CHECK-NEXT:    ret
-;
-; CHECK-NEWLOWERING-LABEL: agnostic_caller_private_za_callee:
-; CHECK-NEWLOWERING:       // %bb.0:
-; CHECK-NEWLOWERING-NEXT:    stp x29, x30, [sp, #-32]! // 16-byte Folded Spill
-; CHECK-NEWLOWERING-NEXT:    str x19, [sp, #16] // 8-byte Spill
-; CHECK-NEWLOWERING-NEXT:    mov x29, sp
-; CHECK-NEWLOWERING-NEXT:    mov x8, x0
-; CHECK-NEWLOWERING-NEXT:    bl __arm_sme_state_size
-; CHECK-NEWLOWERING-NEXT:    sub sp, sp, x0
-; CHECK-NEWLOWERING-NEXT:    mov x19, sp
-; CHECK-NEWLOWERING-NEXT:    mov x0, x19
-; CHECK-NEWLOWERING-NEXT:    bl __arm_sme_save
-; CHECK-NEWLOWERING-NEXT:    mov x0, x8
-; CHECK-NEWLOWERING-NEXT:    bl private_za_decl
-; CHECK-NEWLOWERING-NEXT:    bl private_za_decl
-; CHECK-NEWLOWERING-NEXT:    mov x1, x0
-; CHECK-NEWLOWERING-NEXT:    mov x0, x19
-; CHECK-NEWLOWERING-NEXT:    bl __arm_sme_restore
-; CHECK-NEWLOWERING-NEXT:    mov x...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/172642
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to