Commit 86cf8a1
committed
[LoopVectorize] Enable more early exit vectorisation tests
PR #112138 introduced initial support for dispatching to
multiple exit blocks via split middle blocks. This patch
fixes a few issues so that we can enable more tests to use
the new enable-early-exit-vectorization flag. Fixes are:
1. The code to bail out for any loop live-out values happens
too late. This is because collectUsersInExitBlocks ignores
induction variables, which get dealt with in fixupIVUsers.
I've moved the check much earlier in processLoop by looking
for outside users of loop-defined values.
2. We shouldn't yet be interleaving when vectorising loops
with uncountable early exits, since we've not added support
for this yet.
3. Similarly, we also shouldn't be creating vector epilogues.
4. Similarly, we shouldn't enable tail-folding.
5. The existing implementation doesn't yet support loops
that require scalar epilogues, although I plan to add that
as part of PR #88385.
6. The new split middle blocks weren't being added to the
parent loop.1 parent e84566f commit 86cf8a1
File tree
8 files changed
+302
-81
lines changed- llvm
- lib/Transforms/Vectorize
- test/Transforms/LoopVectorize
- AArch64
8 files changed
+302
-81
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3016 | 3016 | | |
3017 | 3017 | | |
3018 | 3018 | | |
| 3019 | + | |
| 3020 | + | |
| 3021 | + | |
| 3022 | + | |
| 3023 | + | |
| 3024 | + | |
| 3025 | + | |
| 3026 | + | |
| 3027 | + | |
| 3028 | + | |
| 3029 | + | |
| 3030 | + | |
| 3031 | + | |
| 3032 | + | |
| 3033 | + | |
| 3034 | + | |
3019 | 3035 | | |
3020 | 3036 | | |
3021 | 3037 | | |
| |||
3046 | 3062 | | |
3047 | 3063 | | |
3048 | 3064 | | |
3049 | | - | |
3050 | 3065 | | |
3051 | 3066 | | |
3052 | 3067 | | |
| |||
4123 | 4138 | | |
4124 | 4139 | | |
4125 | 4140 | | |
4126 | | - | |
| 4141 | + | |
| 4142 | + | |
4127 | 4143 | | |
4128 | 4144 | | |
4129 | 4145 | | |
| |||
4753 | 4769 | | |
4754 | 4770 | | |
4755 | 4771 | | |
4756 | | - | |
| 4772 | + | |
| 4773 | + | |
| 4774 | + | |
4757 | 4775 | | |
4758 | 4776 | | |
4759 | 4777 | | |
| |||
5001 | 5019 | | |
5002 | 5020 | | |
5003 | 5021 | | |
| 5022 | + | |
| 5023 | + | |
| 5024 | + | |
| 5025 | + | |
5004 | 5026 | | |
5005 | 5027 | | |
5006 | 5028 | | |
| |||
7813 | 7835 | | |
7814 | 7836 | | |
7815 | 7837 | | |
| 7838 | + | |
| 7839 | + | |
7816 | 7840 | | |
7817 | 7841 | | |
7818 | 7842 | | |
7819 | 7843 | | |
7820 | 7844 | | |
| 7845 | + | |
7821 | 7846 | | |
7822 | 7847 | | |
7823 | 7848 | | |
| |||
10177 | 10202 | | |
10178 | 10203 | | |
10179 | 10204 | | |
10180 | | - | |
10181 | | - | |
10182 | | - | |
10183 | | - | |
10184 | | - | |
10185 | | - | |
10186 | | - | |
| 10205 | + | |
| 10206 | + | |
| 10207 | + | |
| 10208 | + | |
| 10209 | + | |
| 10210 | + | |
| 10211 | + | |
| 10212 | + | |
| 10213 | + | |
| 10214 | + | |
| 10215 | + | |
| 10216 | + | |
| 10217 | + | |
| 10218 | + | |
| 10219 | + | |
| 10220 | + | |
| 10221 | + | |
| 10222 | + | |
| 10223 | + | |
| 10224 | + | |
| 10225 | + | |
| 10226 | + | |
| 10227 | + | |
| 10228 | + | |
| 10229 | + | |
| 10230 | + | |
| 10231 | + | |
10187 | 10232 | | |
10188 | 10233 | | |
10189 | 10234 | | |
| |||
10208 | 10253 | | |
10209 | 10254 | | |
10210 | 10255 | | |
| 10256 | + | |
| 10257 | + | |
| 10258 | + | |
| 10259 | + | |
| 10260 | + | |
| 10261 | + | |
| 10262 | + | |
| 10263 | + | |
| 10264 | + | |
| 10265 | + | |
| 10266 | + | |
| 10267 | + | |
| 10268 | + | |
| 10269 | + | |
10211 | 10270 | | |
10212 | 10271 | | |
10213 | 10272 | | |
| |||
Lines changed: 79 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
275 | 293 | | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
276 | 320 | | |
277 | | - | |
278 | | - | |
| 321 | + | |
| 322 | + | |
279 | 323 | | |
280 | 324 | | |
281 | 325 | | |
282 | 326 | | |
283 | 327 | | |
284 | | - | |
| 328 | + | |
285 | 329 | | |
286 | 330 | | |
287 | 331 | | |
288 | 332 | | |
289 | 333 | | |
290 | | - | |
| 334 | + | |
291 | 335 | | |
292 | 336 | | |
293 | 337 | | |
| |||
325 | 369 | | |
326 | 370 | | |
327 | 371 | | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
328 | 396 | | |
329 | 397 | | |
330 | 398 | | |
331 | 399 | | |
332 | 400 | | |
333 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments