From: Segher Boessenkool <segher@kernel.crashing.org>
To: Surya Kumari Jangala <jskumari@linux.vnet.ibm.com>
Cc: gcc-patches@gcc.gnu.org, bergner@linux.ibm.com
Subject: Re: [PATCH] regrename: Fix -fcompare-debug issue in check_new_reg_p [PR105041]
Date: Fri, 10 Jun 2022 10:40:03 -0500 [thread overview]
Message-ID: <20220610154003.GR25951@gate.crashing.org> (raw)
In-Reply-To: <272d6c10-b6eb-a656-1a7c-b071c138b0ed@linux.vnet.ibm.com>
Hi!
On Fri, Jun 10, 2022 at 07:52:57PM +0530, Surya Kumari Jangala wrote:
> In check_new_reg_p, the nregs of a du chain is computed by obtaining the MODE
> of the first element in the chain, and then calling hard_regno_nregs() with the
> MODE. But the first element of the chain can be a DEBUG_INSN whose mode need
> not be the same as the rest of the elements in the du chain. This
> was resulting in fcompare-debug failure as check_new_reg_p was returning a
> different result with -g for the same candidate register. We can instead obtain
> nregs from the du chain itself.
Great, thanks for finding and fixing this! I cannot approve it, you'll
have to wait for someone who can. It looks fine to me, but that does
not mean so much in regrename.c :-)
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/powerpc/pr105041.c
> @@ -0,0 +1,24 @@
> +/* { dg-do compile } */
Please delete this line, it is the default.
> +/* { dg-require-effective-target be } */
Is there a reason to not test this on LE? If not, please remove this
line as well.
> +/* { dg-options "-m32 -mdejagnu-cpu=power4 -O2 -fcompare-debug -fharden-compares -frename-registers" } */
Aha. You check for LE because you use -m32 in the test? Don't, then!
Instead, test with -m32 in your RUNTESTFLAGS, like
make check-gcc-c RUNTESTFLAGS="--target_board=unix'{-m64,-m32}' powerpc.exp=pr105041.c"
or similar.
It's a good idea to add a comment a la
/* PR rtl-optimization/105041: This test failed with -m32. */
Thanks again for the patch!
Segher
next prev parent reply other threads:[~2022-06-10 15:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-10 14:22 Surya Kumari Jangala
2022-06-10 15:40 ` Segher Boessenkool [this message]
2022-06-10 20:09 ` 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=20220610154003.GR25951@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=bergner@linux.ibm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jskumari@linux.vnet.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).