Page MenuHomePhabricator

GlobalISel: Lower s64->s16 G_FPTRUNC
ClosedPublic

Authored by arsenm on Jan 20 2020, 4:34 AM.

Details

Summary

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.

Diff Detail

Event Timeline

arsenm created this revision.Jan 20 2020, 4:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 20 2020, 4:34 AM
nhaehnle removed a subscriber: nhaehnle.Jan 29 2020, 1:27 AM
volkan accepted this revision.Feb 14 2020, 10:05 AM
volkan added a reviewer: volkan.

LGTM.

This revision is now accepted and ready to land.Feb 14 2020, 10:06 AM