Commit 0760885
committed
[SCEV] Make sure starting block is marked as visited when recursively collecting loop guards. (llvm#120749)
When `collectFromBlock` is called without a predecessor (in particular
for loops that don't have a unique predecessor outside the loop) we
never start climbing the predecessor chain, and thus don't mark the
starting block as visited.
Fixes llvm#120615.
(cherry picked from commit f035351)1 parent 7314508 commit 0760885
File tree
2 files changed
+27
-0
lines changed- llvm
- lib/Analysis
- test/Analysis/ScalarEvolution
2 files changed
+27
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15533 | 15533 | | |
15534 | 15534 | | |
15535 | 15535 | | |
| 15536 | + | |
15536 | 15537 | | |
15537 | 15538 | | |
15538 | 15539 | | |
| |||
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
0 commit comments