Commit b3db33b
committed
[LoopVectorize] Use new getUniqueLatchExitBlock routine
With PR #88385 I am introducing support for vectorising more
loops with early exits that don't require a scalar epilogue.
As such, if a loop doesn't have a unique exit block it will
not automatically imply we require a scalar epilogue. Also,
in the only place in the code today where we use the variable
LoopExitBlock we actually mean the exit block from the latch.
Therefore, it seemed reasonable to add a new
getUniqueLatchExitBlock helper that allows the caller to
determine the exit block taken from the latch and use this
instead of getUniqueExitBlock. I also removed LoopExitBlock
since it was only used in one place.
While doing this I also noticed that one of the comments in
requiresScalarEpilogue is wrong when we require a scalar
epilogue, i.e. when we're not exiting from the latch block.
This doesn't always imply we have multiple exits, e.g. see
the test in
Transforms/LoopVectorize/unroll_nonlatch.ll
where the latch unconditionally branches back to the only
exiting block.1 parent 66b2820 commit b3db33b
File tree
3 files changed
+21
-12
lines changed- llvm
- include/llvm/Support
- lib/Transforms/Vectorize
3 files changed
+21
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
297 | 301 | | |
298 | 302 | | |
299 | 303 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
162 | 172 | | |
163 | 173 | | |
164 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
637 | 637 | | |
638 | 638 | | |
639 | 639 | | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | 640 | | |
645 | 641 | | |
646 | 642 | | |
| |||
1363 | 1359 | | |
1364 | 1360 | | |
1365 | 1361 | | |
1366 | | - | |
1367 | | - | |
| 1362 | + | |
| 1363 | + | |
1368 | 1364 | | |
1369 | 1365 | | |
1370 | 1366 | | |
| |||
2004 | 2000 | | |
2005 | 2001 | | |
2006 | 2002 | | |
2007 | | - | |
2008 | | - | |
| 2003 | + | |
2009 | 2004 | | |
2010 | 2005 | | |
2011 | 2006 | | |
| |||
2478 | 2473 | | |
2479 | 2474 | | |
2480 | 2475 | | |
2481 | | - | |
| 2476 | + | |
2482 | 2477 | | |
2483 | 2478 | | |
2484 | 2479 | | |
| |||
2533 | 2528 | | |
2534 | 2529 | | |
2535 | 2530 | | |
2536 | | - | |
2537 | | - | |
| 2531 | + | |
| 2532 | + | |
2538 | 2533 | | |
2539 | 2534 | | |
2540 | 2535 | | |
| |||
7807 | 7802 | | |
7808 | 7803 | | |
7809 | 7804 | | |
7810 | | - | |
| 7805 | + | |
7811 | 7806 | | |
7812 | 7807 | | |
7813 | 7808 | | |
| |||
0 commit comments