Commit 25b7541
committed
[AMDGPU] Fix Hot Block Register Renaming assertions on complex IR
Fix two assertions discovered during CI/CT testing with rocBLAS kernels:
1. isVirtRegMovable() crashed on PHI nodes with multiple value definitions.
Converted assertions to early-return checks, allowing the pass to skip
unmovable registers instead of crashing on legitimate IR patterns.
2. tryMoveValue() assumed LiveIntervalUnion contains only virtual registers,
but it can contain physical registers after allocation. Added isVirtual()
check before calling VirtRegMap::getPhys() to prevent assertion failures.
Both fixes improve robustness without affecting correctness or performance.1 parent f8a7aa6 commit 25b7541
1 file changed
+19
-4
lines changedLines changed: 19 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
384 | 395 | | |
385 | 396 | | |
386 | 397 | | |
| |||
451 | 462 | | |
452 | 463 | | |
453 | 464 | | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
454 | 469 | | |
455 | 470 | | |
456 | 471 | | |
| |||
0 commit comments