[clang] [llvm] [SPIR-V] Add builtin/intrinsic for subgroup ballot (PR #174862)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 8 08:47:12 PST 2026


================
@@ -3797,15 +3797,15 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg,
     return selectExtInst(ResVReg, ResType, I, CL::u_clamp, GL::UClamp);
   case Intrinsic::spv_sclamp:
     return selectExtInst(ResVReg, ResType, I, CL::s_clamp, GL::SClamp);
+  case Intrinsic::spv_subgroup_ballot:
----------------
jhuber6 wrote:

This was merged after I started working on this I guess. Two things, why are we defining all of these as language specific builtins? Language specific builtins, in my opinion, should not exist in 95% of the cases you find them in.

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


More information about the cfe-commits mailing list