[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:05:36 PDT 2025


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

Renamed the function appropriately!

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


More information about the llvm-commits mailing list