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

Julien Pagès via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 6 08:55:18 PDT 2021


jpages updated this revision to Diff 343426.
jpages added a comment.

Rebased to it in Tablegen, it should be cleaner now. I removed the too complex pattern with the conversions from i16 to f16.
Instead this v_pack_b32_f16 instruction will be used only for f16 when we are sure the two inputs have already been flushed if needed.

I tried to do it for global isel, but there are several problems with the legalization of build_vector in this version. build_vector seems to be expanded into g_build_vector_trunc or other variations depending on the test. I'm not sure of what needs to be done in gisel, so I let a TODO for later.


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

https://reviews.llvm.org/D98081

Files:
  llvm/lib/Target/AMDGPU/AMDGPUInstructions.td
  llvm/lib/Target/AMDGPU/SIISelLowering.cpp
  llvm/lib/Target/AMDGPU/SIInstructions.td
  llvm/test/CodeGen/AMDGPU/fcanonicalize-elimination.ll
  llvm/test/CodeGen/AMDGPU/fcanonicalize.f16.ll
  llvm/test/CodeGen/AMDGPU/fexp.ll
  llvm/test/CodeGen/AMDGPU/fpow.ll
  llvm/test/CodeGen/AMDGPU/fptrunc.f16.ll
  llvm/test/CodeGen/AMDGPU/frem.ll
  llvm/test/CodeGen/AMDGPU/llvm.cos.f16.ll
  llvm/test/CodeGen/AMDGPU/llvm.log.f16.ll
  llvm/test/CodeGen/AMDGPU/llvm.log10.f16.ll
  llvm/test/CodeGen/AMDGPU/llvm.rint.f16.ll
  llvm/test/CodeGen/AMDGPU/llvm.round.ll
  llvm/test/CodeGen/AMDGPU/llvm.sin.f16.ll
  llvm/test/CodeGen/AMDGPU/mad-mix-lo.ll
  llvm/test/CodeGen/AMDGPU/v_pack.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98081.343426.patch
Type: text/x-patch
Size: 34796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210506/999b4c3a/attachment.bin>


More information about the llvm-commits mailing list