[llvm] [AMDGPU] - Add s_bitreplicate intrinsic (PR #69209)

Nicolai Hähnle via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 26 05:40:54 PDT 2023


================
@@ -1927,6 +1927,13 @@ def int_amdgcn_inverse_ballot :
   Intrinsic<[llvm_i1_ty], [llvm_anyint_ty],
             [IntrNoMem, IntrWillReturn, IntrNoCallback, IntrNoFree]>;
 
+// Since there is no good VALU equivalent of this instruction, we mark it as convergent.
+// This prevents tranformations from uniform input to divergent input.
+// If the input is in a VGPR, we insert a v_readfirstlane.
----------------
nhaehnle wrote:

I think this should just say: "Lowers to S_BITREPLICATE_B64_B32. The argument must be uniform; otherwise, the result is undefined."

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


More information about the llvm-commits mailing list