Commit 1cea4a0
authored
[AMDGPU][NPM] Fix CFG invalidation detection in insertSimulatedTrap (#169290)
When SIMULATED_TRAP is at the end of a block with no successors,
insertSimulatedTrap incorrectly returns the original MBB despite adding
HaltLoopBB to the CFG.
EmitInstrWithCustomInserter detects CFG changes by comparing the
returned MBB with the original. When they match, it assumes no
modification occurred and skips MachineLoopInfo invalidation. This
causes stale loop information in subsequent passes, particularly when
using the NPM which relies on accurate invalidation signals.
Fix: Return HaltLoopBB to properly signal the CFG modification.1 parent bd0769e commit 1cea4a0
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1963 | 1963 | | |
1964 | 1964 | | |
1965 | 1965 | | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
1966 | 1970 | | |
1967 | 1971 | | |
1968 | 1972 | | |
| |||
0 commit comments