Merged revisions 143552,143554,143557,143560,143562,143564-143567,143570-143573,14357...
[official-gcc.git] / gcc / testsuite / gcc.target / arm / neon-cond-1.c
blob7d87b6e126b59695d1d30a65aa5e486b8df122c0
1 /* { dg-do run } */
2 /* { dg-require-effective-target arm_neon_hw } */
3 /* { dg-options "-O2 -mfpu=neon -mfloat-abi=softfp" } */
4 /* Check that the arm_final_prescan_insn ccfsm code does not try to
5 * conditionally execute NEON instructions. */
6 #include <arm_neon.h>
7 #include <stdlib.h>
9 int __attribute__((noinline))
10 foo(uint32x2_t a, uint32_t *p, uint32_t *q)
12 if (p != q)
13 /* This vst1 instruction could be conditional, except that NEON
14 instructions are never conditional in ARM mode. */
15 vst1_u32(p, a);
16 return 0;
19 int
20 main()
22 uint32x2_t v;
23 uint32_t a[2] = {1, 42};
24 v = vld1_u32(a);
25 v = vadd_u32(v, v);
26 foo(v, a, a);
27 if (a[0] != 1 || a[1] != 42)
28 abort();
29 exit(0);