This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Handle s64->s64 G_FPTOSI/G_FPTOUI
ClosedPublic

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

Details

Reviewers
nhaehnle
kerbowa

Diff Detail

Event Timeline

arsenm created this revision.Jan 6 2020, 6:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 6 2020, 6:13 AM
nhaehnle added inline comments.Jan 29 2020, 1:35 AM
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
1500–1511

Could you please add the intended high-level logic here in a comment?

I admittedly haven't thought this through fully, but I find this code suspicious: doubles have more than twice the mantissa bits of floats, so I don't think two single-precision fptouis can be sufficient to capture all the precision that is there.

arsenm marked an inline comment as done.Jan 29 2020, 5:46 AM
arsenm added inline comments.
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
1500–1511

That would require me to have any idea what the high level logic is here. This is just copied from the existing legalization, which has no comments

nhaehnle accepted this revision.Jan 30 2020, 1:30 AM

Okay, so the SelectionDAG is likely broken then :)

... which makes it reasonable to go ahead here for GlobalISel parity. Please add a TODO comment to verify and document the high-level logic, though.

This revision is now accepted and ready to land.Jan 30 2020, 1:30 AM