Page MenuHomePhabricator

[compiler-rt] [builtins] Support conversion between fp16 and fp128
ClosedPublic

Authored by zatrazz on Nov 27 2020, 11:47 AM.

Details

Summary

This patch adds both extendhftf2 and trunctfhf2 to support
conversion between half-precision and quad-precision floating-point
values. They are built iff the compiler supports _Float16.

Some notes on ARM plaforms: while fp16 is supported on all
architectures, _Float16 is supported only for 32-bit ARM, 64-bit ARM,
and SPIR (as indicated by clang/docs/LanguageExtensions.rst). Also,
fp16 is a storage format and 64-bit ARM supports floating-point
convert precision to half as base armv8-a instruction.

This patch does not change the ABI for 32-bit ARM, it will continue
to pass _Float16 as uint16.

This re-enabled revert done by https://reviews.llvm.org/rGb534beabeed3ba1777cd0ff9ce552d077e496726

Diff Detail

Event Timeline

zatrazz created this revision.Nov 27 2020, 11:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 27 2020, 11:47 AM
Herald added subscribers: Restricted Project, kristof.beyls, mgorny, dberris. · View Herald Transcript
zatrazz requested review of this revision.Nov 27 2020, 11:47 AM
This revision was not accepted when it landed; it landed in state Needs Review.Dec 8 2020, 6:52 AM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.