This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: Implement s32->s64 G_FPTOSI lowering
ClosedPublic

Authored by arsenm on Jan 6 2020, 6:16 AM.

Details

Summary

Port directly from DAG version.

The lowering for G_FPTOUI used to fail on AMDGPU because it uses
G_FPTOSI.

Diff Detail

Event Timeline

arsenm created this revision.Jan 6 2020, 6:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 6 2020, 6:16 AM
paquette added inline comments.Jan 6 2020, 1:33 PM
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
4025

Do we need the whole GitHub URL here? Why not just compiler-rt/lib/builtins/fixsfdi.c?

Also it looks like most the work is in fp_fixint_impl.inc? Would it be better to point at that instead?

4027–4072

Can we have some comments explaining what's going on here? I guess it's *technically* already in the compiler-rt code, but it would be nice to see it right here, especially in case that code ever changes.

arsenm marked an inline comment as done.Jan 6 2020, 1:42 PM
arsenm added inline comments.
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
4025

Comments copied directly from the DAG version

paquette accepted this revision.Jan 6 2020, 1:54 PM

LGTM

This revision is now accepted and ready to land.Jan 6 2020, 1:54 PM