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

Jessica Del via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 27 02:09:51 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.
----------------
OutOfCache wrote:

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

I adjusted the comment. That is a good way of thinking about documentation.


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


More information about the llvm-commits mailing list