Add support for conditional reductions using SVE CLASTB
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / sve / const_pred_2.C
blob55dc8741f4c692ec1b6e1cbcd956a617af27d96a
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -msve-vector-bits=256" } */
4 typedef short vnx8hi __attribute__((vector_size(32)));
6 vnx8hi
7 foo (vnx8hi x, vnx8hi y)
9   return (vnx8hi) { -1, 0, 0, -1, -1, -1, 0, 0,
10                     -1, -1, -1, -1, 0, 0, 0, 0 } ? x : y;
13 /* { dg-final { scan-assembler {\tldr\tp[0-9]+,} } } */
14 /* { dg-final { scan-assembler {\t\.byte\t65\n\t\.byte\t5\n\t\.byte\t85\n\t\.byte\t0\n} } } */