1 /* { dg-require-effective-target vect_cond_mixed } */
2 /* { dg-require-effective-target vect_float } */
11 __attribute__((noinline
, noclone
)) void
15 for (i
= 0; i
< N
/4; i
++)
17 k
[4*i
] = a
[4*i
] < b
[4*i
] ? 17 : 0;
18 k
[4*i
+1] = a
[4*i
+1] < b
[4*i
+1] ? 17 : 0;
19 k
[4*i
+2] = a
[4*i
+2] < b
[4*i
+2] ? 17 : 0;
20 k
[4*i
+3] = a
[4*i
+3] < b
[4*i
+3] ? 17 : 0;
24 __attribute__((noinline
, noclone
)) void
28 for (i
= 0; i
< N
/2; ++i
)
30 k
[2*i
] = a
[2*i
] < b
[2*i
] ? 0 : 24;
31 k
[2*i
+1] = a
[2*i
+1] < b
[2*i
+1] ? 7 : 4;
35 __attribute__((noinline
, noclone
)) void
39 for (i
= 0; i
< N
/2; ++i
)
41 k
[2*i
] = a
[2*i
] < b
[2*i
] ? 51 : 12;
42 k
[2*i
+1] = a
[2*i
+1] > b
[2*i
+1] ? 51 : 12;
46 __attribute__((noinline
, noclone
)) void
50 for (i
= 0; i
< N
/2; ++i
)
52 int d0
= d
[2*i
], e0
= e
[2*i
];
53 int d1
= d
[2*i
+1], e1
= e
[2*i
+1];
54 f
[2*i
] = a
[2*i
] >= b
[2*i
] ? d0
: e0
;
55 f
[2*i
+1] = a
[2*i
+1] >= b
[2*i
+1] ? d1
: e1
;
66 for (i
= 0; i
< N
; i
++)
70 case 0: asm (""); a
[i
] = - i
- 1; b
[i
] = i
+ 1; break;
71 case 1: a
[i
] = 0; b
[i
] = 0; break;
72 case 2: a
[i
] = i
+ 1; b
[i
] = - i
- 1; break;
73 case 3: a
[i
] = i
; b
[i
] = i
+ 7; break;
74 case 4: a
[i
] = i
; b
[i
] = i
; break;
75 case 5: a
[i
] = i
+ 16; b
[i
] = i
+ 3; break;
76 case 6: a
[i
] = - i
- 5; b
[i
] = - i
; break;
77 case 7: a
[i
] = - i
; b
[i
] = - i
; break;
78 case 8: a
[i
] = - i
; b
[i
] = - i
- 7; break;
85 for (i
= 0; i
< N
; i
++)
86 if (k
[i
] != ((i
% 3) == 0 ? 17 : 0))
90 for (i
= 0; i
< N
; i
++)
96 if (k
[i
] != ((i
/9 % 2) == 0 ? 0 : 7))
102 if (k
[i
] != ((i
/9 % 2) == 0 ? 4 : 24))
108 if (k
[i
] != ((i
/9 % 2) == 0 ? 24 : 4))
112 if (k
[i
] != ((i
/9 % 2) == 0 ? 7 : 0))
121 for (i
= 0; i
< N
; i
++)
122 if (f
[i
] != ((i
% 3) == 0 ? e
[i
] : d
[i
]))
128 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" } } */