This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Legalize s16->s64 G_FPEXT
ClosedPublic

Authored by Petar.Avramovic on Jul 17 2020, 8:09 AM.

Details

Summary

Legalize using narrowScalar as s16->s32 G_FPEXT
followed by s32->s64 G_FPEXT.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJul 17 2020, 8:09 AM
arsenm added inline comments.Jul 17 2020, 8:49 AM
llvm/lib/Target/AMDGPU/SIInstructions.td
857–860

I think having this as an instruction pattern was a hack; it would be better to handle this like the other casts with a split in the legalizer

857–860

This doesn't handle source modifiers for example

Petar.Avramovic retitled this revision from AMDGPU/GlobalISel: Select s16->s64 G_FPEXT to AMDGPU/GlobalISel: Legalize s16->s64 G_FPEXT.
Petar.Avramovic edited the summary of this revision. (Show Details)

Split G_FPEXT in legalizer. This could also be widenScalar for TypeIndex == 1.

arsenm accepted this revision.Jul 20 2020, 6:14 AM
This revision is now accepted and ready to land.Jul 20 2020, 6:14 AM
This revision was automatically updated to reflect the committed changes.