From: Segher Boessenkool <segher@kernel.crashing.org>
To: HAO CHEN GUI <guihaoc@linux.ibm.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>, David <dje.gcc@gmail.com>,
"Kewen.Lin" <linkw@linux.ibm.com>,
Peter Bergner <bergner@linux.ibm.com>
Subject: Re: [PATCH, rs6000] Add multiply-add expand pattern [PR103109]
Date: Mon, 1 Aug 2022 12:13:07 -0500 [thread overview]
Message-ID: <20220801171307.GF25951@gate.crashing.org> (raw)
In-Reply-To: <bcd0a865-2bda-ab01-33de-36d384cb89e3@linux.ibm.com>
Hi!
On Mon, Jul 25, 2022 at 01:11:47PM +0800, HAO CHEN GUI wrote:
> This patch adds an expand and several insns for multiply-add with
> three 64bit operands.
> PR target/103109
> * config/rs6000/rs6000.md (<u>maddditi4): New pattern for
> multiply-add.
Please don't break lines unnecessarily.
> +(define_expand "<u>maddditi4"
> + [(set (match_operand:TI 0 "gpc_reg_operand")
> + (plus:TI
> + (mult:TI (any_extend:TI
> + (match_operand:DI 1 "gpc_reg_operand"))
> + (any_extend:TI
> + (match_operand:DI 2 "gpc_reg_operand")))
> + (any_extend:TI
> + (match_operand:DI 3 "gpc_reg_operand"))))]
Broken indentation, should be
(define_expand "<u>maddditi4"
[(set (match_operand:TI 0 "gpc_reg_operand")
(plus:TI
(mult:TI (any_extend:TI (match_operand:DI 1 "gpc_reg_operand"))
(any_extend:TI (match_operand:DI 2 "gpc_reg_operand")))
(any_extend:TI (match_operand:DI 3 "gpc_reg_operand"))))]
> + "TARGET_POWERPC64 && TARGET_MADDLD"
TARGET_MADDLD should itself already include TARGET_POWERPC64. Could you
please send a separate patch for that first?
> +(define_insn "<u>madddi4_lowpart"
> + [(set (match_operand:DI 0 "gpc_reg_operand" "=r")
> + (subreg:DI
> + (plus:TI
> + (mult:TI (any_extend:TI
> + (match_operand:DI 1 "gpc_reg_operand" "r"))
> + (any_extend:TI
> + (match_operand:DI 2 "gpc_reg_operand" "r")))
> + (any_extend:TI
> + (match_operand:DI 3 "gpc_reg_operand" "r")))
> + 8))]
[(set (match_operand:DI 0 "gpc_reg_operand" "=r")
(subreg:DI
(plus:TI
(mult:TI (any_extend:TI (match_operand:DI 1 "gpc_reg_operand" "r"))
(any_extend:TI (match_operand:DI 2 "gpc_reg_operand" "r")))
(any_extend:TI (match_operand:DI 3 "gpc_reg_operand" "r")))
8))]
(and similar for _le of course).
Segher
next prev parent reply other threads:[~2022-08-01 17:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-25 5:11 HAO CHEN GUI
2022-08-01 2:01 ` Ping " HAO CHEN GUI
2022-08-01 6:19 ` Kewen.Lin
2022-08-01 17:23 ` Segher Boessenkool
2022-08-01 17:13 ` Segher Boessenkool [this message]
2022-08-01 21:10 ` Segher Boessenkool
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=20220801171307.GF25951@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=bergner@linux.ibm.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=guihaoc@linux.ibm.com \
--cc=linkw@linux.ibm.com \
/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).