| /* { dg-do assemble { target aarch64_asm_sve_ok } } */ |
| /* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details --save-temps" } */ |
| |
| #include <stdint.h> |
| |
| #if !defined(TYPE) |
| #define TYPE uint32_t |
| #endif |
| |
| #define N 254 |
| |
| /* Non-simple condition reduction. */ |
| |
| TYPE __attribute__ ((noinline, noclone)) |
| condition_reduction (TYPE *a, TYPE min_v) |
| { |
| TYPE last = 65; |
| |
| for (TYPE i = 0; i < N; i++) |
| if (a[i] < min_v) |
| last = a[i]; |
| |
| return last; |
| } |
| |
| /* { dg-final { scan-tree-dump "operating on partial vectors." "vect" } } */ |
| /* { dg-final { scan-assembler {\tclastb\ts[0-9]+, p[0-7], s[0-9]+, z[0-9]+\.s} } } */ |