1 /* { dg-do run { target aarch64_sve_hw } } */
2 /* { dg-options "-O3" } */
3
4 #include "fmla_2.c"
5
6 int __attribute__ ((optimize (1)))
main(void)7 main (void)
8 {
9 double a[N], b[N], c[N], d[N], e[N];
10 int64_t cond[N];
11
12 for (int i = 0; i < N; ++i)
13 {
14 c[i] = i + i % 5;
15 d[i] = i + i % 7;
16 e[i] = i + i % 9;
17 cond[i] = i % 3;
18 }
19
20 f (a, b, c, d, e, cond);
21
22 for (int i = 0; i < N; ++i)
23 if (a[i] != (cond[i] ? __builtin_fma (c[i], d[i], e[i]) : e[i])
24 || b[i] != (cond[i] ? __builtin_fma (c[i], e[i], d[i]) : d[i]))
25 __builtin_abort ();
26
27 return 0;
28 }
29