[PATCH] D74697: AMDGPU/GlobalISel: Select v2s32->v2s16 G_TRUNC

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 17 02:01:54 PST 2020


foad accepted this revision.
foad added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: llvm/test/CodeGen/AMDGPU/GlobalISel/trunc.ll:95
+; GFX8-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX8-NEXT:    v_mov_b32_sdwa v0, v1 dst_sel:WORD_1 dst_unused:UNUSED_PRESERVE src0_sel:WORD_0
+; GFX8-NEXT:    s_setpc_b64 s[30:31]
----------------
Could also do this with a single v_perm instruction, but I don't know if there's any reason to prefer it (e.g. are there any processors that have v_perm but don't have sdwa?).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74697/new/

https://reviews.llvm.org/D74697





More information about the llvm-commits mailing list