1 /* { dg-additional-options "-O2 -fno-schedule-insns" } */
2 /* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
3
4 #include "arm_sve.h"
5
6 /*
7 ** foo:
8 ** ptrue (p[0-7])\.d, all
9 ** pfalse (p[0-7])\.b
10 ** ptrue (p[0-7])\.s, all
11 ** trn1 (p[0-7])\.d, \2\.d, \3\.d
12 ** trn1 \2\.d, \1\.d, \3\.d
13 ** faddv (h[0-31]), \4\, (z[0-31]).h
14 ** faddv (h[0-31]), \2\, \6\.h
15 ** str \5, [x0]
16 ** str \7, [x0, 2]
17 ** ret
18 */
foo(svfloat16_t in,float16_t * dst)19 void foo(svfloat16_t in, float16_t *dst) {
20 const svbool_t pg_q0 = svdupq_n_b16(1, 0, 1, 0, 0, 0, 0, 0);
21 const svbool_t pg_f0 = svdupq_n_b16(1, 0, 0, 0, 0, 0, 0, 0);
22 dst[0] = svaddv_f16(pg_f0, in);
23 dst[1] = svaddv_f16(pg_q0, in);
24 }
25
26