| 1 |
/* { dg-options "-O3 -fshrink-wrap -save-temps" } */ |
| 2 |
/* { dg-do run { target { aarch64_sme_hw && aarch64_sve_hw } } } */ |
| 3 |
/* { dg-do compile { target { ! { aarch64_sme_hw && aarch64_sve_hw } } } } */ |
| 4 |
/* { dg-final { check-function-bodies "**" "" } } */ |
| 5 |
|
| 6 |
#include <arm_sme.h> |
| 7 |
|
| 8 |
#pragma GCC target "+sve" |
| 9 |
|
| 10 |
[[gnu::noipa]] |
| 11 |
__arm_streaming |
| 12 |
int callee (int x) |
| 13 |
{ |
| 14 |
return 0; |
| 15 |
} |
| 16 |
|
| 17 |
/* |
| 18 |
** foo: |
| 19 |
** cbnz w0, [^\n]* |
| 20 |
** cntd x0 |
| 21 |
** ret |
| 22 |
** ... |
| 23 |
*/ |
| 24 |
__arm_streaming |
| 25 |
int foo(int x) |
| 26 |
{ |
| 27 |
if (x) |
| 28 |
return callee(3); |
| 29 |
return svcntd(); |
| 30 |
} |
| 31 |
|
| 32 |
/* |
| 33 |
** bar: |
| 34 |
** ... |
| 35 |
** smstart [^\n]* |
| 36 |
** ... |
| 37 |
** ( |
| 38 |
** cntd [^\n]* |
| 39 |
** ... |
| 40 |
** cbn?z [^\n]* |
| 41 |
** | |
| 42 |
** cbn?z [^\n]* |
| 43 |
** ... |
| 44 |
** cntd [^\n]* |
| 45 |
** ) |
| 46 |
** ... |
| 47 |
*/ |
| 48 |
|
| 49 |
[[gnu::noipa]] |
| 50 |
__arm_locally_streaming |
| 51 |
int bar(int x) |
| 52 |
{ |
| 53 |
if (x) |
| 54 |
return callee(3); |
| 55 |
return svcntd(); |
| 56 |
} |
| 57 |
|
| 58 |
/* |
| 59 |
** baz: |
| 60 |
** cbnz w0, [^\n]* |
| 61 |
** cntd x0 |
| 62 |
** ret |
| 63 |
** ... |
| 64 |
*/ |
| 65 |
__arm_streaming |
| 66 |
int baz(int x) |
| 67 |
{ |
| 68 |
if (x) |
| 69 |
return callee(3); |
| 70 |
return svcntd(); |
| 71 |
} |
| 72 |
|
| 73 |
int main() |
| 74 |
{ |
| 75 |
if (bar(0) != svcntsd()) |
| 76 |
__builtin_abort(); |
| 77 |
return 0; |
| 78 |
} |