gcc/testsuite/gcc.target/aarch64/sve/target_optimization-1.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O1" } */ |
| 3 | |
| 4 | #include <arm_sve.h> |
| 5 | |
| 6 | /* Turn off SVE overall */ |
| 7 | #pragma GCC target("+nosve") |
| 8 | |
| 9 | /* But the function turns it on again so it should work. |
| 10 | Even if changing the optimization level from O1 to O2. */ |
| 11 | int __attribute__((target ("+sve"), optimize(2))) |
| 12 | bar (void) |
| 13 | { |
| 14 | svfloat32_t xseg; |
| 15 | return svlen_f32(xseg); |
| 16 | } |