testsuite/52641 - Fix more sloppy tests.
[official-gcc.git] / gcc / testsuite / gcc.target / arm / mve / mve_vadcq_vsbcq_fpscr_overwrite.c
blob931c9d2f30bcb08fdb4f15f851603f34cf5e8e57
1 /* { dg-do run } */
2 /* { dg-require-effective-target arm_mve_hw } */
3 /* { dg-options "-O2" } */
4 /* { dg-add-options arm_v8_1m_mve } */
6 #include <arm_mve.h>
8 volatile int32x4_t c1;
9 volatile uint32x4_t c2;
10 int carry;
12 int
13 main ()
15 int32x4_t a1 = vcreateq_s32 (0, 0);
16 int32x4_t b1 = vcreateq_s32 (0, 0);
17 int32x4_t inactive1 = vcreateq_s32 (0, 0);
19 uint32x4_t a2 = vcreateq_u32 (0, 0);
20 uint32x4_t b2 = vcreateq_u32 (0, 0);
21 uint32x4_t inactive2 = vcreateq_u32 (0, 0);
23 mve_pred16_t p = 0xFFFF;
24 carry = 0xFFFFFFFF;
26 __builtin_arm_set_fpscr_nzcvqc (0);
27 c1 = vadcq (a1, b1, &carry);
28 if (__builtin_arm_get_fpscr_nzcvqc () & !0x20000000)
29 __builtin_abort ();
30 carry = 0xFFFFFFFF;
31 __builtin_arm_set_fpscr_nzcvqc (0);
32 c2 = vadcq (a2, b2, &carry);
33 if (__builtin_arm_get_fpscr_nzcvqc () & !0x20000000)
34 __builtin_abort ();
35 carry = 0xFFFFFFFF;
36 __builtin_arm_set_fpscr_nzcvqc (0);
37 c1 = vsbcq (a1, b1, &carry);
38 if (__builtin_arm_get_fpscr_nzcvqc () & !0x20000000)
39 __builtin_abort ();
40 carry = 0xFFFFFFFF;
41 __builtin_arm_set_fpscr_nzcvqc (0);
42 c2 = vsbcq (a2, b2, &carry);
43 if (__builtin_arm_get_fpscr_nzcvqc () & !0x20000000)
44 __builtin_abort ();
45 carry = 0xFFFFFFFF;
46 __builtin_arm_set_fpscr_nzcvqc (0);
47 c1 = vadcq_m (inactive1, a1, b1, &carry, p);
48 if (__builtin_arm_get_fpscr_nzcvqc () & !0x20000000)
49 __builtin_abort ();
50 carry = 0xFFFFFFFF;
51 __builtin_arm_set_fpscr_nzcvqc (0);
52 c2 = vadcq_m (inactive2, a2, b2, &carry, p);
53 if (__builtin_arm_get_fpscr_nzcvqc () & !0x20000000)
54 __builtin_abort ();
55 carry = 0xFFFFFFFF;
56 __builtin_arm_set_fpscr_nzcvqc (0);
57 c1 = vsbcq_m (inactive1, a1, b1, &carry, p);
58 if (__builtin_arm_get_fpscr_nzcvqc () & !0x20000000)
59 __builtin_abort ();
60 carry = 0xFFFFFFFF;
61 __builtin_arm_set_fpscr_nzcvqc (0);
62 c2 = vsbcq_m (inactive2, a2, b2, &carry, p);
63 if (__builtin_arm_get_fpscr_nzcvqc () & !0x20000000)
64 __builtin_abort ();
66 return 0;