[llvm] [AMDGPU][True16][MC] Support v_swap_b16. (PR #100442)
Georg Lehmann via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 25 10:41:44 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> {
----------------
DadSchoorse wrote:
Are you sure this opcode is VOP1 only? When I implemented support for `v_swap_b16` in our compiler, I tested it with VOP3 encoding and it worked fine. VOP3 v_swap_b16 is nessecary to address v128-v255.
https://github.com/llvm/llvm-project/pull/100442
More information about the llvm-commits
mailing list