[PATCH] D92242: [compiler-rt] [builtins] Support conversion between fp16 and fp128

Adhemerval Zanella via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 27 11:47:57 PST 2020

zatrazz created this revision.
zatrazz added reviewers: ostannard, bryanpkc, atrosinenko, MaskRay.
Herald added subscribers: Sanitizers, kristof.beyls, mgorny, dberris.
Herald added a project: Sanitizers.
zatrazz requested review of this revision.

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

  rG LLVM Github Monorepo



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92242.308098.patch
Type: text/x-patch
Size: 9179 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201127/d8485ff8/attachment.bin>

More information about the llvm-commits mailing list