Commit 18ea570
committed
[LV][NFC] Clean up tail-folding check for early-exit loops
This patch moves the check for a single latch exit from computeMaxVF()
to LoopVectorizationLegality::canFoldTailByMasking(), as it duplicates
the logic when foldTailByMasking() returns false.
It also introduces HasSingleLatchExit to prevent early-exit loops from
entering code paths that assume non-predicated loops.1 parent 4cb41d1 commit 18ea570
File tree
2 files changed
+11
-18
lines changed- llvm/lib/Transforms/Vectorize
2 files changed
+11
-18
lines changedLines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1924 | 1924 | | |
1925 | 1925 | | |
1926 | 1926 | | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
1927 | 1935 | | |
1928 | 1936 | | |
1929 | 1937 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3987 | 3987 | | |
3988 | 3988 | | |
3989 | 3989 | | |
3990 | | - | |
3991 | | - | |
3992 | | - | |
3993 | | - | |
3994 | | - | |
3995 | | - | |
3996 | | - | |
3997 | | - | |
3998 | | - | |
3999 | | - | |
4000 | | - | |
4001 | | - | |
4002 | | - | |
4003 | | - | |
4004 | | - | |
4005 | | - | |
4006 | 3990 | | |
4007 | 3991 | | |
4008 | 3992 | | |
| |||
4049 | 4033 | | |
4050 | 4034 | | |
4051 | 4035 | | |
4052 | | - | |
| 4036 | + | |
| 4037 | + | |
4053 | 4038 | | |
4054 | 4039 | | |
4055 | 4040 | | |
| |||
4060 | 4045 | | |
4061 | 4046 | | |
4062 | 4047 | | |
4063 | | - | |
| 4048 | + | |
4064 | 4049 | | |
4065 | 4050 | | |
4066 | 4051 | | |
| |||
0 commit comments