/* Condition reduction with maximum possible loop size. Will fail to
vectorize because the vectorisation requires a slot for default values. */
-char
+signed char __attribute__((noinline,noclone))
condition_reduction (char *a, char min_v)
{
- char last = -72;
+ signed char last = -72;
for (int i = 0; i < N; i++)
if (a[i] < min_v)
return last;
}
-char
-main (void)
+int
+main ()
{
- char a[N] = {
+ signed char a[N] = {
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
check_vect ();
- char ret = condition_reduction (a, 16);
-
+ signed char ret = condition_reduction (a, 16);
if (ret != 10)
abort ();
+ ret = condition_reduction (a, 1);
+ if (ret != -72)
+ abort ();
+
return 0;
}