gcc/testsuite/gcc.target/arm/mve/pr114323.c
raw| 1 | /* { dg-do run } */ |
| 2 | /* { dg-require-effective-target arm_mve_hw } */ |
| 3 | /* { dg-options "-O2" } */ |
| 4 | /* { dg-add-options arm_v8_1m_mve_fp } */ |
| 5 | |
| 6 | #include <arm_mve.h> |
| 7 | |
| 8 | __attribute__((noipa)) |
| 9 | uint32x4_t foo (void) { |
| 10 | uint32x4_t V0 = vld1q_u32(((const uint32_t[4]){1, 2, 3, 4})); |
| 11 | return V0; |
| 12 | } |
| 13 | |
| 14 | int main(void) |
| 15 | { |
| 16 | uint32_t buf[4]; |
| 17 | vst1q_u32 (buf, foo()); |
| 18 | |
| 19 | for (int i = 0; i < 4; i++) |
| 20 | if (buf[i] != i+1) |
| 21 | __builtin_abort (); |
| 22 | } |