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 16:10:42 -0500 [thread overview]
Message-ID: <20220801211042.GH25951@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:
> +(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))]
> + "TARGET_POWERPC64 && TARGET_MADDLD && BYTES_BIG_ENDIAN"
> + "maddld %0,%1,%2,%3"
> + [(set_attr "type" "mul")])
So, hrm. This (as well as the _le version) simplifies to just the :DI
ops, without subreg. Not properly simplified patterns like this will
not ever match, so most optimisations on this will not work :-(
Segher
prev parent reply other threads:[~2022-08-01 21:11 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
2022-08-01 21:10 ` Segher Boessenkool [this message]
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=20220801211042.GH25951@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).