Re: [RFC 1/2] RISC-V: Add support for _Bfloat16.

2023-11-10 Thread Jeff Law
On 10/25/23 04:15, Jin Ma wrote: +;; The conversion of DF to BF needs to be done with SF if there is a +;; chance to generate at least one instruction, otherwise just using +;; libfunc __truncdfbf2. +(define_expand "truncdfbf2" + [(set (match_operand:BF 0 "register_operand" "=f") +

Re: [RFC 1/2] RISC-V: Add support for _Bfloat16.

2023-10-25 Thread Jin Ma
> >>> +;; The conversion of DF to BF needs to be done with SF if there is a > >>> +;; chance to generate at least one instruction, otherwise just using > >>> +;; libfunc __truncdfbf2. > >>> +(define_expand "truncdfbf2" > >>> + [(set (match_operand:BF 0 "register_operand" "=f") > >>> +

Re: [RFC 1/2] RISC-V: Add support for _Bfloat16.

2023-10-09 Thread Jeff Law
On 10/9/23 00:18, Jin Ma wrote: +;; The conversion of DF to BF needs to be done with SF if there is a +;; chance to generate at least one instruction, otherwise just using +;; libfunc __truncdfbf2. +(define_expand "truncdfbf2" + [(set (match_operand:BF 0 "register_operand" "=f") +

Re: [RFC 1/2] RISC-V: Add support for _Bfloat16.

2023-10-09 Thread Jin Ma
> On 9/19/23 02:44, Jin Ma wrote: > > gcc/ChangeLog: > > > > * config/riscv/iterators.md (HFBF): New. > > * config/riscv/riscv-builtins.cc (riscv_init_builtin_types): > > Initialize data type_Bfloat16. > > * config/riscv/riscv-modes.def (FLOAT_MODE): New. > >

Re: [RFC 1/2] RISC-V: Add support for _Bfloat16.

2023-09-29 Thread Jeff Law
On 9/19/23 02:44, Jin Ma wrote: gcc/ChangeLog: * config/riscv/iterators.md (HFBF): New. * config/riscv/riscv-builtins.cc (riscv_init_builtin_types): Initialize data type_Bfloat16. * config/riscv/riscv-modes.def (FLOAT_MODE): New. (ADJUST_FLOAT_FORMAT):

[RFC 1/2] RISC-V: Add support for _Bfloat16.

2023-09-19 Thread Jin Ma
gcc/ChangeLog: * config/riscv/iterators.md (HFBF): New. * config/riscv/riscv-builtins.cc (riscv_init_builtin_types): Initialize data type_Bfloat16. * config/riscv/riscv-modes.def (FLOAT_MODE): New. (ADJUST_FLOAT_FORMAT): New. * config/riscv/riscv.cc