https://github.com/ssahasra commented: The PR description needs to be updated. I am still reviewing SIInsertWaitcnts.cpp, but @Pierre-vh should definitely take a look at it. https://github.com/llvm/llvm-project/pull/220442