[llvm] [AMDGPU][True16][MC] Support v_swap_b16. (PR #100442)

Ivan Kosarev via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 5 03:51:10 PDT 2024


================
@@ -729,7 +729,20 @@ def V_ACCVGPR_MOV_B32 : VOP1_Pseudo<"v_accvgpr_mov_b32", VOPProfileAccMov, [], 1
   let isAsCheapAsAMove = 1;
 }
 
+def VOP_SWAP_I16 : VOPProfile_True16<VOP_I16_I16> {
+  let Outs32 = (outs VOPDstOperand_t16Lo128:$vdst,
+                     VOPSrcEncodedDstOperand_t16Lo128:$vdst1);
+  let Ins32 = (ins VOPSrcEncodedDstOperand_t16Lo128:$src0,
+                   VOPDstOperand_t16Lo128:$src1);
+  let Asm32 = " $vdst, $src0";
+}
+
 let SubtargetPredicate = isGFX11Plus in {
+  def V_SWAP_B16 : VOP1_Pseudo<"v_swap_b16", VOP_SWAP_I16, [], /* VOP1Only= */ 1> {
----------------
kosarev wrote:

The response from our HW guys reads that the VOP3 codes are not guaranteed to work correctly under all possible circumstances. Meaning, they should not be considered supported regardless of observed side effects.

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


More information about the llvm-commits mailing list