]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PATCH v1 1/1] RISC-V: Nan-box the result of movbf on soft-bf16
authorXiao Zeng <zengxiao@eswincomputing.com>
Wed, 8 May 2024 20:00:58 +0000 (14:00 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Wed, 8 May 2024 20:00:58 +0000 (14:00 -0600)
commitce51e6727c9d69bbab0e766c449e60fd41f5f2f9
treeaf14908f78cbb9d314372423de7374054f5edaed
parent1c234097487927a4388ddcc690b63597bb3a90dc
[PATCH v1 1/1] RISC-V: Nan-box the result of movbf on soft-bf16

1 This patch implements the Nan-box of bf16.

2 Please refer to the Nan-box implementation of hf16 in:
<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=057dc349021660c40699fb5c98fd9cac8e168653>

3 The discussion about Nan-box can be found on the website:
<https://www.mail-archive.com/search?q=Nan-box+the+result+of+movhf+on+soft-fp16&l=gcc-patches%40gcc.gnu.org>

4 Below test are passed for this patch
        * The riscv fully regression test.

gcc/ChangeLog:

* config/riscv/riscv.cc (riscv_legitimize_move): Expand movbf
with Nan-boxing value.
* config/riscv/riscv.md (*movbf_softfloat_boxing): New pattern.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/_Bfloat16-nanboxing.c: New test.
gcc/config/riscv/riscv.cc
gcc/config/riscv/riscv.md
gcc/testsuite/gcc.target/riscv/_Bfloat16-nanboxing.c [new file with mode: 0644]