[llvm] [AMDGPU][SIInsertWaitcnts] drop OldWaitcntInstr only when it is processed (PR #145720)

Sameer Sahasrabuddhe via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 25 08:28:44 PDT 2025


ssahasra wrote:

The affected tests need a careful review. I do believe that in each of these cases, the `vmcnt(0)` is getting optimized away (correctly) by `simplifyWaitcnt()`. Earlier it was hidden from that simplification.

- llvm/test/CodeGen/AMDGPU/waitcnt-trailing.mir

This is the motivating testcase for this change. The first commit contains the test including the spurious s_waitcnt, and the second commit shows how it is optimized away.

https://github.com/llvm/llvm-project/pull/145720


More information about the llvm-commits mailing list