[llvm] [AMDGPU]: Rewrite mbcnt_lo/mbcnt_hi to work item ID where applicable (PR #160496)

Teja Alaghari via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 3 00:16:31 PDT 2025


================
@@ -2113,6 +2119,181 @@ INITIALIZE_PASS_DEPENDENCY(UniformityInfoWrapperPass)
 INITIALIZE_PASS_END(AMDGPUCodeGenPrepare, DEBUG_TYPE, "AMDGPU IR optimizations",
                     false, false)
 
+bool AMDGPUCodeGenPrepareImpl::visitMbcntLo(IntrinsicInst &I) {
----------------
TejaX-Alaghari wrote:

Changed the function signatures to make `visitMbcntLo` and `visitMbcntHi` methods const as requested as they don't modify the class state directly.

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


More information about the llvm-commits mailing list