From: Segher Boessenkool <segher@kernel.crashing.org>
To: Michael Meissner <meissner@linux.ibm.com>,
gcc-patches@gcc.gnu.org, "Kewen.Lin" <linkw@linux.ibm.com>,
David Edelsohn <dje.gcc@gmail.com>,
Peter Bergner <bergner@linux.ibm.com>
Subject: Re: [PATCH V5, 2/2] PR target/105325: Fix memory constraints for power10 fusion.
Date: Fri, 26 May 2023 10:02:28 -0500 [thread overview]
Message-ID: <20230526150228.GN19790@gate.crashing.org> (raw)
In-Reply-To: <ZFu60EPEOJTV/GA1@toto.the-meissners.org>
On Wed, May 10, 2023 at 11:40:00AM -0400, Michael Meissner wrote:
> This patch applies stricter predicates and constraints for LD and LWA
> instructions with power10 fusion. These instructions are DS-form instructions,
> which means that the bottom 2 bits of the address must be 0.
The low two bits of the offset, yes.
> --- a/gcc/config/rs6000/genfusion.pl
> +++ b/gcc/config/rs6000/genfusion.pl
> @@ -129,6 +129,12 @@ sub print_ld_cmpi_p10
> print " \"\"\n";
> print " [(set_attr \"type\" \"fused_load_cmpi\")\n";
> print " (set_attr \"cost\" \"8\")\n";
> +
> + if ($extend eq "sign")
> + {
> + print " (set_attr \"sign_extend\" \"yes\")\n";
> + }
You never ever need backslashes like this in Perl code, btw. For
example:
print qq{ (set_attr "sign_extend" "yes")\n};
or
print qq/ (set_attr "sign_extend" "yes")\n/;
or
print <<"HERE"
(set_attr "sign_extend" "yes")
HERE
or millions of other ways, all of which are much nicer than cramped code
that tries to look like C (but has very different semantics in all ways
that matter). (Also zillions of ways that are worse still, but that is
the price of freedom maybe :-) )
> - # Memory predicate to use.
> + # Memory predicate to use. For LWA, use the special LWA_OPERAND.
Explain *why*? It is obvious *what*!
Maybe just split the series into more patches?
> @@ -0,0 +1,26 @@
> +/* { dg-do assemble } */
> +/* { dg-require-effective-target lp64 } */
> +/* { dg-require-effective-target power10_ok } */
power10_ok should no longer exist, btw. Technical debt has to be
repaid :-/
This patch is readable btw. Thanks :-)
Segher
next prev parent reply other threads:[~2023-05-26 15:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-10 15:37 [PATCH V5, 0/2] PR target/105325: Fix constraint issue with " Michael Meissner
2023-05-10 15:38 ` [PATCH V5, 1/2] PR target/105325: Rewrite genfusion.pl's gen_ld_cmpi_p10 function Michael Meissner
2023-05-26 14:35 ` Segher Boessenkool
2023-05-10 15:40 ` [PATCH V5, 2/2] PR target/105325: Fix memory constraints for power10 fusion Michael Meissner
2023-05-26 15:02 ` Segher Boessenkool [this message]
2023-05-15 18:22 ` Ping: [PATCH V5] PR target/105325: Fix constraint issue with " Michael Meissner
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=20230526150228.GN19790@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=linkw@linux.ibm.com \
--cc=meissner@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).