[PATCH] D62023: GlobalISel: Implement lower for S64->S32 [SU]ITOFP

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 16 11:49:53 PDT 2019


arsenm created this revision.
arsenm added reviewers: aemerson, aditya_nandakumar, dsanders, paquette.
Herald added subscribers: Petar.Avramovic, volkan, tpr, kristof.beyls, rovka, nhaehnle, wdng, jvesely.

This is ported from the custom AMDGPU DAG implementation. I think this
is a better default expansion than what the DAG currently uses, at
least if the target has CTLZ.

     

This implements the signed version in terms of the unsigned
conversion. I'm somewhat confused about what the default DAG
expansions are really doing. TLI has expandUINT_TO_FP implementation
is implemented with 2 signed conversions, and the signed version
doesn't seem to be implemented at all. There is a second expansion in
LegalizeDAG which involves temporary stack slots. In the future
someone may want to port the old DAG expansions here depending on what
instructions are legal.


https://reviews.llvm.org/D62023

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62023.199873.patch
Type: text/x-patch
Size: 12111 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190516/afdb277c/attachment.bin>


More information about the llvm-commits mailing list