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

Juan Manuel Martinez CaamaƱo via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 28 06:44:30 PDT 2025


================
@@ -93,6 +96,13 @@ static cl::opt<bool> DisableFDivExpand(
   cl::ReallyHidden,
   cl::init(false));
 
+// Disable bitsin(typeof(x)) - popcnt(x) to s_bcnt0(x) transformation.
+static cl::opt<bool>
+    DisableBcnt0("amdgpu-codegenprepare-disable-bcnt0",
+                 cl::desc("Prevent transforming bitsin(typeof(x)) - "
+                          "popcount(x) to bcnt0(x) in AMDGPUCodeGenPrepare"),
+                 cl::ReallyHidden, cl::init(false));
+
----------------
jmmartinez wrote:

You can remove this. It is not used anywhere.

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


More information about the cfe-commits mailing list