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

Nicolai Hähnle via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 26 05:41:53 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:

Basically, prefer documenting things in terms of the contract between the frontend and the backend instead of explaining / restating the current implementation.

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


More information about the llvm-commits mailing list