1 /* { dg-options "-O3" } */
2 
3 #include <stdint.h>
4 
5 #define N 55
6 
7 void __attribute__ ((noipa))
f(double * restrict a,double * restrict b,double * restrict c,double * restrict d,double * restrict e,int64_t * restrict cond)8 f (double *restrict a, double *restrict b, double *restrict c,
9    double *restrict d, double *restrict e, int64_t *restrict cond)
10 {
11   for (int i = 0; i < N; ++i)
12     {
13       a[i] = cond[i] ? __builtin_fma (c[i], d[i], e[i]) : e[i];
14       b[i] = cond[i] ? __builtin_fma (c[i], e[i], d[i]) : d[i];
15     }
16 }
17 
18 /* { dg-final { scan-assembler-times {\tfmla\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, z[0-9]+\.d\n} 2 } } */
19 /* { dg-final { scan-assembler-not {\tfmad\t} } } */
20 /* { dg-final { scan-assembler-times {\tst1d} 2 } } */
21