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
];
11 __attribute__((noinline
, noclone
)) void
15 for (i
= 0; i
< N
; ++i
)
23 __attribute__((noinline
, noclone
)) void
27 for (i
= 0; i
< N
; ++i
)
28 k
[i
] = (a
[i
] < b
[i
]) & (c
[i
] < d
[i
]);
31 __attribute__((noinline
, noclone
)) void
35 for (i
= 0; i
< N
; ++i
)
43 __attribute__((noinline
, noclone
)) void
47 for (i
= 0; i
< N
; ++i
)
48 k
[i
] = (a
[i
] < b
[i
]) | (c
[i
] < d
[i
]);
51 __attribute__((noinline
, noclone
)) void
55 for (i
= 0; i
< N
; ++i
)
63 __attribute__((noinline
, noclone
)) void
67 for (i
= 0; i
< N
; ++i
)
68 p
[i
] = (a
[i
] < b
[i
]) & (c
[i
] < d
[i
]);
71 __attribute__((noinline
, noclone
)) void
75 for (i
= 0; i
< N
; ++i
)
83 __attribute__((noinline
, noclone
)) void
87 for (i
= 0; i
< N
; ++i
)
88 p
[i
] = (a
[i
] < b
[i
]) | (c
[i
] < d
[i
]);
98 for (i
= 0; i
< N
; i
++)
102 case 0: asm (""); a
[i
] = - i
- 1; b
[i
] = i
+ 1; break;
103 case 1: a
[i
] = 0; b
[i
] = 0; break;
104 case 2: a
[i
] = i
+ 1; b
[i
] = - i
- 1; break;
105 case 3: a
[i
] = i
; b
[i
] = i
+ 7; break;
106 case 4: a
[i
] = i
; b
[i
] = i
; break;
107 case 5: a
[i
] = i
+ 16; b
[i
] = i
+ 3; break;
108 case 6: a
[i
] = - i
- 5; b
[i
] = - i
; break;
109 case 7: a
[i
] = - i
; b
[i
] = - i
; break;
110 case 8: a
[i
] = - i
; b
[i
] = - i
- 7; break;
113 for (i
= 0; i
< N
; i
++)
117 case 0: c
[i
] = a
[i
/ 9]; d
[i
] = b
[i
/ 9]; break;
118 case 1: c
[i
] = a
[i
/ 9 + 3]; d
[i
] = b
[i
/ 9 + 3]; break;
119 case 2: c
[i
] = a
[i
/ 9 + 6]; d
[i
] = b
[i
/ 9 + 6]; break;
123 for (i
= 0; i
< N
; i
++)
124 if (k
[i
] != ((i
% 3) == 0 && ((i
/ 9) % 3) == 0))
126 __builtin_memset (k
, 0, sizeof (k
));
128 for (i
= 0; i
< N
; i
++)
129 if (k
[i
] != ((i
% 3) == 0 && ((i
/ 9) % 3) == 0))
131 __builtin_memset (k
, 0, sizeof (k
));
133 for (i
= 0; i
< N
; i
++)
134 if (k
[i
] != ((i
% 3) == 0 || ((i
/ 9) % 3) == 0))
136 __builtin_memset (k
, 0, sizeof (k
));
138 for (i
= 0; i
< N
; i
++)
139 if (k
[i
] != ((i
% 3) == 0 || ((i
/ 9) % 3) == 0))
141 __builtin_memset (k
, 0, sizeof (k
));
143 for (i
= 0; i
< N
; i
++)
144 if (k
[i
] != ((i
% 3) == 0 && ((i
/ 9) % 3) == 0))
146 __builtin_memset (k
, 0, sizeof (k
));
148 for (i
= 0; i
< N
; i
++)
149 if (k
[i
] != ((i
% 3) == 0 && ((i
/ 9) % 3) == 0))
151 __builtin_memset (k
, 0, sizeof (k
));
153 for (i
= 0; i
< N
; i
++)
154 if (k
[i
] != ((i
% 3) == 0 || ((i
/ 9) % 3) == 0))
156 __builtin_memset (k
, 0, sizeof (k
));
158 for (i
= 0; i
< N
; i
++)
159 if (k
[i
] != ((i
% 3) == 0 || ((i
/ 9) % 3) == 0))
161 __builtin_memset (k
, 0, sizeof (k
));
166 /* { dg-final { scan-tree-dump-times "note: vectorized 1 loops" 8 "vect" } } */