Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.target / arm / pr83687.c
blob42754138660739d9fbffcd337460e26de94f736f
1 /* { dg-do run } */
2 /* { dg-require-effective-target arm_neon_hw } */
3 /* { dg-options "-O2" } */
4 /* { dg-add-options arm_neon } */
6 #include <arm_neon.h>
8 __attribute__ ((noinline)) int8_t
9 testFunction1 (int8_t a, int8_t b)
11 volatile int8x16_t sub = vsubq_s8 (vdupq_n_s8 (a), vdupq_n_s8 (b));
12 int8x16_t abs = vabsq_s8 (sub);
13 return vgetq_lane_s8 (abs, 0);
16 __attribute__ ((noinline)) int8_t
17 testFunction2 (int8_t a, int8_t b)
19 int8x16_t sub = vsubq_s8 (vdupq_n_s8 (a), vdupq_n_s8 (b));
20 int8x16_t abs = vabsq_s8 (sub);
21 return vgetq_lane_s8 (abs, 0);
24 int
25 main (void)
27 if (testFunction1 (-100, 100) != testFunction2 (-100, 100))
28 __builtin_abort ();
30 return 0;