[all-commits] [llvm/llvm-project] db61b1: [compiler-rt] [builtins] Support conversion betwee...

Adhemerval Zanella via All-commits all-commits at lists.llvm.org
Tue Dec 8 06:52:29 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: db61b1844e11f29a06d6dc4aab87ebb4f0aabfdd
      https://github.com/llvm/llvm-project/commit/db61b1844e11f29a06d6dc4aab87ebb4f0aabfdd
  Author: Adhemerval Zanella <adhemerval.zanella at linaro.org>
  Date:   2020-12-08 (Tue, 08 Dec 2020)

  Changed paths:
    M compiler-rt/lib/builtins/CMakeLists.txt
    A compiler-rt/lib/builtins/extendhftf2.c
    A compiler-rt/lib/builtins/trunctfhf2.c
    A compiler-rt/test/builtins/Unit/extendhftf2_test.c
    A compiler-rt/test/builtins/Unit/trunctfhf2_test.c

  Log Message:
  -----------
  [compiler-rt] [builtins] Support conversion between fp16 and fp128

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

Differential Revision: https://reviews.llvm.org/D92242




More information about the All-commits mailing list