================
@@ -384,6 +384,19 @@ static Intrinsic::ID 
getWaveActiveMinIntrinsic(llvm::Triple::ArchType Arch,
   }
 }
 
+static Intrinsic::ID getPrefixCountBitsIntrinsic(llvm::Triple::ArchType Arch) {
+  switch (Arch) {
+  case llvm::Triple::spirv:
+    return Intrinsic::spv_subgroup_prefix_bit_count;
+  case llvm::Triple::dxil: {
+    return Intrinsic::dx_wave_prefix_bit_count;
----------------
inbelic wrote:

nit:

Is this/will this be a common pattern in intrinsic defs? The subgroup_ and 
wave_ followed by a common name? If so it might make sense to have a similar 
`GENERATE_HLSL_INTRINSIC_FUNCTION` macro for this case?

https://github.com/llvm/llvm-project/pull/178059
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to