Commit c571bd9
authored
[cherrypick][SCEV] Pick fixes for recursive loop guard collection. (#9797)
* [SCEV] Fix exit condition for recursive loop guard collection (llvm#120442)
When assumptions are present `Terms.size()` does not actually count the
number of conditions collected from dominating branches; introduce a
separate counter.
Fixes llvm#120237
(cherry picked from commit acfd26a)
* [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 06a77c5 commit c571bd9
File tree
2 files changed
+64
-2
lines changed- llvm
- lib/Analysis
- test/Analysis/ScalarEvolution
2 files changed
+64
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15532 | 15532 | | |
15533 | 15533 | | |
15534 | 15534 | | |
| 15535 | + | |
| 15536 | + | |
15535 | 15537 | | |
15536 | 15538 | | |
15537 | 15539 | | |
| |||
15543 | 15545 | | |
15544 | 15546 | | |
15545 | 15547 | | |
| 15548 | + | |
15546 | 15549 | | |
15547 | 15550 | | |
15548 | | - | |
15549 | | - | |
| 15551 | + | |
| 15552 | + | |
15550 | 15553 | | |
15551 | 15554 | | |
15552 | 15555 | | |
| |||
Lines changed: 59 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 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 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
0 commit comments