This is an archive of the discontinued LLVM Phabricator instance.

[TargetLowering] expandFP_TO_UINT - improve fp16 support
ClosedPublic

Authored by RKSimon on Nov 19 2018, 8:32 AM.

Details

Summary

As discussed on D53794, for float types with ranges smaller than the destination integer type, then we should be able to just use a regular FP_TO_SINT opcode.

I thought we'd need to provide MSA test cases for very small integer types as well (fp16 -> i8 etc.), but it turns out that promotion will kick in so they're unnecessary.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Nov 19 2018, 8:32 AM
atanasyan accepted this revision.Nov 19 2018, 10:41 AM

LGTM

lib/CodeGen/SelectionDAG/TargetLowering.cpp
4172 ↗(On Diff #174622)

Indentation?

This revision is now accepted and ready to land.Nov 19 2018, 10:41 AM
This revision was automatically updated to reflect the committed changes.