================
@@ -0,0 +1,37 @@
+// 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
+
+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'}}
+ 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}}
+ 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}}
+ private_za_callee_b();
+ // expected-remark@+1 {{call from 'test_za_merge_paths' to 'unknown callee'
sets up a lazy save for ZA}}
+ private_za_callee_c();
----------------
sdesmalen-arm wrote:
nit: the comment you had here before:
```
// The new lowering won't report this call as the save is already needed due
// to the call to `private_za_callee_*()` calls on both paths to this BB.
```
may be useful to keep?
(you can change the offset to `+3` if you add this comment right above the call)
https://github.com/llvm/llvm-project/pull/170277
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits