From: Jeff Law <jeffreyalaw@gmail.com>
To: Philipp Tomsich <philipp.tomsich@vrull.eu>,
Vineet Gupta <vineetg@rivosinc.com>
Cc: Manolis Tsamis <manolis.tsamis@vrull.eu>,
Jivan Hakobyan <jivanhakobyan9@gmail.com>,
gcc-patches@gcc.gnu.org
Subject: Re: RISC-V: Folding memory for FP + constant case
Date: Tue, 1 Aug 2023 17:22:53 -0600 [thread overview]
Message-ID: <22456fc3-81f6-6927-7340-7e545f34723f@gmail.com> (raw)
In-Reply-To: <CAAeLtUDEyM+O-W3RNyqdRuqZBksf-bVp3nHo=ULzJGwZO1+4Ng@mail.gmail.com>
On 8/1/23 17:06, Philipp Tomsich wrote:
> Very helpful! Looks as if regprop for stack_pointer is now either too
> conservative — or one of our patches is missing in everyone's test
> setup; we'll take a closer look.
They must not be working as expected or folks are using old trees.
Manolis's work for regcprop has been on the trunk for about 5-6 weeks ag
this point:
> commit 893883f2f8f56984209c6ed210ee992ff71a14b0
> Author: Manolis Tsamis <manolis.tsamis@vrull.eu>
> Date: Tue Jun 20 16:23:52 2023 +0200
>
> cprop_hardreg: fix ORIGINAL_REGNO/REG_ATTRS/REG_POINTER handling
>
> Fixes: 6a2e8dcbbd4bab3
>
> Propagation for the stack pointer in regcprop was enabled in
> 6a2e8dcbbd4bab3, but set ORIGINAL_REGNO/REG_ATTRS/REG_POINTER for
> stack_pointer_rtx which caused regression (e.g., PR 110313, PR 110308).
>
> This fix adds special handling for stack_pointer_rtx in the places
> where maybe_mode_change is called. This also adds an check in
> maybe_mode_change to return the stack pointer only when the requested
> mode matches the mode of stack_pointer_rtx.
>
> PR debug/110308
>
> gcc/ChangeLog:
>
> * regcprop.cc (maybe_mode_change): Check stack_pointer_rtx mode.
> (maybe_copy_reg_attrs): New function.
> (find_oldest_value_reg): Use maybe_copy_reg_attrs.
> (copyprop_hardreg_forward_1): Ditto.
>
> gcc/testsuite/ChangeLog:
>
> * g++.dg/torture/pr110308.C: New test.
>
> Signed-off-by: Manolis Tsamis <manolis.tsamis@vrull.eu>
> Signed-off-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
>
> commit 6a2e8dcbbd4bab374b27abea375bf7a921047800
> Author: Manolis Tsamis <manolis.tsamis@vrull.eu>
> Date: Thu May 25 13:44:41 2023 +0200
>
> cprop_hardreg: Enable propagation of the stack pointer if possible
>
> Propagation of the stack pointer in cprop_hardreg is currenty
> forbidden in all cases, due to maybe_mode_change returning NULL.
> Relax this restriction and allow propagation when no mode change is
> requested.
>
> gcc/ChangeLog:
>
> * regcprop.cc (maybe_mode_change): Enable stack pointer
> propagation.
next prev parent reply other threads:[~2023-08-01 23:22 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-12 20:59 Jivan Hakobyan
2023-07-15 6:16 ` Jeff Law
2023-07-25 11:24 ` Jivan Hakobyan
2023-07-26 3:31 ` Jeff Law
2023-08-01 19:14 ` Vineet Gupta
2023-08-01 20:16 ` Jivan Hakobyan
2023-08-01 21:55 ` Jeff Law
2023-08-01 22:07 ` Philipp Tomsich
2023-08-01 23:03 ` Vineet Gupta
2023-08-01 23:06 ` Philipp Tomsich
2023-08-01 23:13 ` Vineet Gupta
2023-08-01 23:27 ` Jeff Law
2023-08-01 23:38 ` Vineet Gupta
2023-08-01 23:52 ` Jeff Law
2023-08-04 9:52 ` Manolis Tsamis
2023-08-04 16:23 ` Jeff Law
2023-08-05 9:27 ` Manolis Tsamis
2023-08-01 23:22 ` Jeff Law [this message]
2023-08-01 23:28 ` Vineet Gupta
2023-08-01 23:21 ` Jeff Law
2023-08-09 19: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=22456fc3-81f6-6927-7340-7e545f34723f@gmail.com \
--to=jeffreyalaw@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jivanhakobyan9@gmail.com \
--cc=manolis.tsamis@vrull.eu \
--cc=philipp.tomsich@vrull.eu \
--cc=vineetg@rivosinc.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).