[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
Sun Sep 28 23:04:29 PDT 2025


================
@@ -0,0 +1,18 @@
+; RUN: opt -S -mtriple amdgcn-unknown-amdhsa -passes=instcombine < %s | FileCheck %s
+; CHECK-NOT: amdgcn.mbcnt_lo
+; CHECK-NOT: amdgcn.mbcnt_hi
+; CHECK: @llvm.amdgcn.workitem.id.x()
+
+define i32 @kernel() !reqd_work_group_size !0 {
----------------
TejaX-Alaghari wrote:

Renamed appropriately!

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


More information about the llvm-commits mailing list