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

Brox Chen via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 25 20:42:55 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> {
----------------
broxigarchen wrote:

According to the docs this should be VOP1 only for GFX11/12. I am not sure if such usage is supported when VOP3 is not listed in supported format.  Hi @Sisyph @kosarev Do you know anything about this?

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


More information about the llvm-commits mailing list