1 /* { dg-require-effective-target vect_cond_mixed } */
2 /* { dg-require-effective-target vect_float } */
3 /* { dg-additional-options "-fno-ipa-icf" } */
8 float a
[N
], b
[N
], c
[N
], d
[N
];
12 __attribute__((noinline
, noclone
)) void
16 for (i
= 0; i
< N
; ++i
)
18 unsigned int x
= a
[i
] < b
[i
] ? -1 : 0;
19 unsigned int y
= c
[i
] < d
[i
] ? -1 : 0;
24 __attribute__((noinline
, noclone
)) void
28 for (i
= 0; i
< N
; ++i
)
36 __attribute__((noinline
, noclone
)) void
40 for (i
= 0; i
< N
; ++i
)
41 j
[i
] = (a
[i
] < b
[i
]) & (c
[i
] < d
[i
]);
44 __attribute__((noinline
, noclone
)) void
48 for (i
= 0; i
< N
; ++i
)
56 __attribute__((noinline
, noclone
)) void
60 for (i
= 0; i
< N
; ++i
)
61 k
[i
] = (a
[i
] < b
[i
]) & (c
[i
] < d
[i
]);
64 __attribute__((noinline
, noclone
)) void
68 for (i
= 0; i
< N
; ++i
)
70 unsigned int x
= a
[i
] < b
[i
] ? -1 : 0;
71 unsigned int y
= c
[i
] < d
[i
] ? -1 : 0;
76 __attribute__((noinline
, noclone
)) void
80 for (i
= 0; i
< N
; ++i
)
88 __attribute__((noinline
, noclone
)) void
92 for (i
= 0; i
< N
; ++i
)
93 j
[i
] = (a
[i
] < b
[i
]) | (c
[i
] < d
[i
]);
96 __attribute__((noinline
, noclone
)) void
100 for (i
= 0; i
< N
; ++i
)
108 __attribute__((noinline
, noclone
)) void
112 for (i
= 0; i
< N
; ++i
)
113 k
[i
] = (a
[i
] < b
[i
]) | (c
[i
] < d
[i
]);
123 for (i
= 0; i
< N
; i
++)
127 case 0: asm (""); a
[i
] = - i
- 1; b
[i
] = i
+ 1; break;
128 case 1: a
[i
] = 0; b
[i
] = 0; break;
129 case 2: a
[i
] = i
+ 1; b
[i
] = - i
- 1; break;
130 case 3: a
[i
] = i
; b
[i
] = i
+ 7; break;
131 case 4: a
[i
] = i
; b
[i
] = i
; break;
132 case 5: a
[i
] = i
+ 16; b
[i
] = i
+ 3; break;
133 case 6: a
[i
] = - i
- 5; b
[i
] = - i
; break;
134 case 7: a
[i
] = - i
; b
[i
] = - i
; break;
135 case 8: a
[i
] = - i
; b
[i
] = - i
- 7; break;
138 for (i
= 0; i
< N
; i
++)
142 case 0: c
[i
] = a
[i
/ 9]; d
[i
] = b
[i
/ 9]; break;
143 case 1: c
[i
] = a
[i
/ 9 + 3]; d
[i
] = b
[i
/ 9 + 3]; break;
144 case 2: c
[i
] = a
[i
/ 9 + 6]; d
[i
] = b
[i
/ 9 + 6]; break;
149 for (i
= 0; i
< N
; i
++)
150 if (j
[i
] != ((i
% 3) == 0 && ((i
/ 9) % 3) == 0))
152 __builtin_memset (j
, -6, sizeof (j
));
155 for (i
= 0; i
< N
; i
++)
156 if (j
[i
] != ((i
% 3) == 0 && ((i
/ 9) % 3) == 0))
158 __builtin_memset (j
, -6, sizeof (j
));
161 for (i
= 0; i
< N
; i
++)
162 if (j
[i
] != ((i
% 3) == 0 && ((i
/ 9) % 3) == 0))
164 __builtin_memset (j
, -6, sizeof (j
));
167 for (i
= 0; i
< N
; i
++)
168 if (k
[i
] != ((i
% 3) == 0 && ((i
/ 9) % 3) == 0))
170 __builtin_memset (k
, -6, sizeof (k
));
173 for (i
= 0; i
< N
; i
++)
174 if (k
[i
] != ((i
% 3) == 0 && ((i
/ 9) % 3) == 0))
176 __builtin_memset (k
, -6, sizeof (k
));
179 for (i
= 0; i
< N
; i
++)
180 if (j
[i
] != ((i
% 3) == 0 || ((i
/ 9) % 3) == 0))
182 __builtin_memset (j
, -6, sizeof (j
));
185 for (i
= 0; i
< N
; i
++)
186 if (j
[i
] != ((i
% 3) == 0 || ((i
/ 9) % 3) == 0))
188 __builtin_memset (j
, -6, sizeof (j
));
191 for (i
= 0; i
< N
; i
++)
192 if (j
[i
] != ((i
% 3) == 0 || ((i
/ 9) % 3) == 0))
194 __builtin_memset (j
, -6, sizeof (j
));
197 for (i
= 0; i
< N
; i
++)
198 if (k
[i
] != ((i
% 3) == 0 || ((i
/ 9) % 3) == 0))
200 __builtin_memset (k
, -6, sizeof (k
));
203 for (i
= 0; i
< N
; i
++)
204 if (k
[i
] != ((i
% 3) == 0 || ((i
/ 9) % 3) == 0))
206 __builtin_memset (k
, -6, sizeof (k
));
211 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 10 "vect" } } */