1 /* { dg-do compile } */
2 /* { dg-require-effective-target arm_neon_ok } */
3 /* { dg-options "-O2 -funsafe-math-optimizations" } */
4 /* { dg-add-options arm_neon } */
7 float32x2_t
f_sub_abs_to_vabd_32(float32x2_t val1
, float32x2_t val2
)
9 float32x2_t sres
= vsub_f32(val1
, val2
);
10 float32x2_t res
= vabs_f32 (sres
);
14 /* { dg-final { scan-assembler "vabd\.f32" } }*/
17 int8x8_t
sub_abs_to_vabd_8(int8x8_t val1
, int8x8_t val2
)
19 int8x8_t sres
= vsub_s8(val1
, val2
);
20 int8x8_t res
= vabs_s8 (sres
);
24 /* { dg-final { scan-assembler "vabd\.s8" } }*/
26 int16x4_t
sub_abs_to_vabd_16(int16x4_t val1
, int16x4_t val2
)
28 int16x4_t sres
= vsub_s16(val1
, val2
);
29 int16x4_t res
= vabs_s16 (sres
);
33 /* { dg-final { scan-assembler "vabd\.s16" } }*/
35 int32x2_t
sub_abs_to_vabd_32(int32x2_t val1
, int32x2_t val2
)
37 int32x2_t sres
= vsub_s32(val1
, val2
);
38 int32x2_t res
= vabs_s32 (sres
);
42 /* { dg-final { scan-assembler "vabd\.s32" } }*/