[clang] [llvm] Match bitsin(typeof(x)) - popcnt(x) to s_bcnt0_i32 on AMDGPU (PR #164847)

Patrick Simmons via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 28 12:57:24 PDT 2025


================
@@ -2359,6 +2359,12 @@ def int_amdgcn_mbcnt_hi :
   DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
             [IntrNoMem]>;
 
+def int_amdgcn_bcnt32_lo :
----------------
linuxrocks123 wrote:

@arsenm were you referring to the Clang intrinsic or this code here?  If this code here, how can I perform the optimization at the IR level without `Intrinsic::amdgcn_bcnt32_lo`?

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


More information about the cfe-commits mailing list