+139
−0
Loading
[AMDGPU][SIInsertWaitcnts] Fix iota_range assertion when OtherMarks is empty in mergeAsyncMarks() (#193499)
WaitcntBrackets::mergeAsyncMarks() asserts when merging async wait-count
state at a CFG join point where one predecessor has pending async memory
operations and the other does not.
Problem:
- The existing early-exit only handles the both-empty case
- When OtherMarks is empty but AsyncMarks is not, MergeCount = min(0, N)
= 0
- seq_inclusive<unsigned>(1, 0) fires: "Assertion Begin <= End failed"
Changes:
- Add early return when MergeCount == 0 (OtherMarks is empty)
- When the other predecessor contributed no async marks, our marks are
unchanged and no stricter waits are needed
- Add regression lit test: asyncmark-merge-empty-other.mir