This is an archive of the discontinued LLVM Phabricator instance.

[LegalizeTypes] Add SoftenFloatRes_FREEZE
ClosedPublic

Authored by aqjune on Mar 28 2020, 1:40 AM.

Details

Diff Detail

Event Timeline

aqjune created this revision.Mar 28 2020, 1:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 28 2020, 1:40 AM

I only have a test for SoftenFloatOp_FREEZE though; is there a good reference for writing a test for SoftenFloatRes_FREEZE?

craig.topper added inline comments.Mar 28 2020, 1:40 PM
llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
191

The type should come from TLI.getTypeToTransformTo

192

You should call GetSoftenedFloat on the operand.

805

Shouldn't the type of the input to freeze match the output so this shouldn't be needed.

aqjune updated this revision to Diff 253424.Mar 29 2020, 8:42 AM

Address comments

aqjune marked 3 inline comments as done.EditedMar 29 2020, 8:44 AM

Thank you for the comments, I was trying to get more familiar with type legalization.
After the update, the test now calls SoftenFloatRes_FREEZE as well.

This revision is now accepted and ready to land.Mar 30 2020, 11:29 AM
aqjune retitled this revision from [LegalizeTypes] Add SoftenFloatRes/SoftenFloatOp functions for FREEZE to [LegalizeTypes] Add SoftenFloatRes_FREEZE.Mar 30 2020, 6:15 PM
aqjune edited the summary of this revision. (Show Details)
This revision was automatically updated to reflect the committed changes.