[PATCH] D73031: GlobalISel: Lower s64->s16 G_FPTRUNC

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 20 04:35:39 PST 2020


arsenm created this revision.
arsenm added reviewers: aemerson, aditya_nandakumar, paquette, dsanders.
Herald added subscribers: kerbowa, Petar.Avramovic, volkan, hiraditya, tpr, rovka, nhaehnle, wdng, jvesely.
Herald added a project: LLVM.

This is more or less directly ported from the AMDGPU custom lowering
for FP_TO_FP16. I made a few minor fixups (using G_UNMERGE_VALUES
instead of creating shift/trunc to extract the two halves, and zexting
an inverted compare instead of select_cc).

      

This also does not include the fast math expansion the DAG which
converts to f32 and then to f16. I think that belongs in a
pre-legalize combine instead.


https://reviews.llvm.org/D73031

Files:
  llvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
  llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
  llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
  llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fptrunc.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73031.239077.patch
Type: text/x-patch
Size: 32192 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200120/28962a3e/attachment-0001.bin>


More information about the llvm-commits mailing list