From: Kito Cheng <kito.cheng@gmail.com>
To: Liao Shihua <shihua@iscas.ac.cn>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [RFC] RISC-V: Support risc-v bfloat16 This patch support bfloat16 in riscv like x86_64 and arm.
Date: Tue, 25 Apr 2023 21:23:52 +0800 [thread overview]
Message-ID: <CA+yXCZBu7jG-T0vt5oLhW33O0n0xC4DivuvuQLjoudi96LYeFg@mail.gmail.com> (raw)
In-Reply-To: <20230307091204.1498-1-shihua@iscas.ac.cn>
Hi ShiHua:
Thanks for your contribution to the zfbfmin extension :)
General comments:
- Add zfbfmin to riscv_ext_version_table
- Add test case to verify the -march is accepted.
- Add testcase to test argument passing.
- Add testcase for operations.
- Add testcase for compares.
> +(define_insn "*movbf_softfloat"
> + [(set (match_operand:BF 0 "nonimmediate_operand" "=f, r,r,m,*f,*r")
> + (match_operand:BF 1 "move_operand" " f,Gr,m,r,*r,*f"))]
> + "!TARGET_ZFHMIN
Should be TARGET_ZFBFMIN?
> @@ -3192,7 +3192,11 @@ riscv_emit_float_compare (enum rtx_code *code, rtx *op0, rtx *op1)
> else if (GET_MODE (cmp_op0) == HFmode && TARGET_64BIT) \
> emit_insn (gen_f##CMP##_quiethfdi4 (*op0, cmp_op0, cmp_op1)); \
> else if (GET_MODE (cmp_op0) == HFmode) \
> - emit_insn (gen_f##CMP##_quiethfsi4 (*op0, cmp_op0, cmp_op1)); \
> + emit_insn (gen_f##CMP##_quietbfsi4 (*op0, cmp_op0, cmp_op1)); \
> + else if (GET_MODE (cmp_op0) == BFmode && TARGET_64BIT) \
> + emit_insn (gen_f##CMP##_quietbfdi4 (*op0, cmp_op0, cmp_op1)); \
> + else if (GET_MODE (cmp_op0) == BFmode) \
> + emit_insn (gen_f##CMP##_quietbfsi4 (*op0, cmp_op0, cmp_op1)); \
> else \
> gcc_unreachable (); \
> *op1 = const0_rtx; \
Do we really need this? I thought we'll always promote to SF before
they compare?
next prev parent reply other threads:[~2023-04-25 13:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-07 9:12 Liao Shihua
2023-04-25 13:23 ` Kito Cheng [this message]
2023-06-01 6:51 ` Jin Ma
[not found] ` <MW5PR11MB59081DA700F563D0DD24161FA9499@MW5PR11MB5908.namprd11.prod.outlook.com>
2023-06-01 7:01 ` FW: " juzhe.zhong
2023-06-01 16:48 ` Jeff Law
2023-06-01 16:56 ` Palmer Dabbelt
2023-06-01 17:53 ` Jeff Law
2023-06-01 16:59 ` Philipp Tomsich
2023-06-01 9:07 ` Liao Shihua
2023-06-15 7:51 ` Jin Ma
2023-06-15 9:52 ` Jin Ma
2023-06-17 15:31 ` Jeff Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+yXCZBu7jG-T0vt5oLhW33O0n0xC4DivuvuQLjoudi96LYeFg@mail.gmail.com \
--to=kito.cheng@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=shihua@iscas.ac.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).