[PATCH] D98081: [AMDGPU] Improve Codegen for build_vector

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 7 06:27:52 PDT 2021


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIInstructions.td:2400-2402
+  (v2f16 (build_vector (f16 (bitconvert (i16 (trunc VGPR_32:$src0)))),
+                       (f16 (bitconvert (i16 (trunc VGPR_32:$src1)))))),
+  (V_PACK_B32_F16_e64 SRCMODS.NONE, VGPR_32:$src0, SRCMODS.NONE, VGPR_32:$src1)
----------------
arsenm wrote:
> This isn't a simple bitpacking, this has FP output effects like flushing
I believe source modifiers should work as normal, so you can use the VOP3Mods complex patterns for the sources


================
Comment at: llvm/test/CodeGen/AMDGPU/v_pack.ll:148
+}
+
+attributes #0 = { nounwind }
----------------
Can you add some cases with source modifier combinations?


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

https://reviews.llvm.org/D98081



More information about the llvm-commits mailing list