public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com
Subject: Re: [PATCH] lra: Avoid unfolded plus-0
Date: Mon, 4 Sep 2023 23:05:00 -0600	[thread overview]
Message-ID: <06503c0a-48a8-4a86-882d-60263254fc98@gmail.com> (raw)
In-Reply-To: <mpt1qfjz13s.fsf@arm.com>



On 8/31/23 09:24, Richard Sandiford via Gcc-patches wrote:
> While backporting another patch to an earlier release, I hit a
> situation in which lra_eliminate_regs_1 would eliminate an address to:
> 
>      (plus (reg:P R) (const_int 0))
> 
> This address compared not-equal to plain:
> 
>      (reg:P R)
> 
> which caused an ICE in a later peephole2.  (The ICE showed up in
> gfortran.fortran-torture/compile/pr80464.f90 on the branch but seems
> to be latent on trunk.)
> 
> These unfolded PLUSes shouldn't occur in the insn stream, and later code
> in the same function tried to avoid them.
> 
> Tested on aarch64-linux-gnu so far, but I'll test on x86_64-linux-gnu too.
> Does this look OK?
> 
> There are probably other instances of the same thing elsewhere,
> but it seemed safer to stick to the one that caused the issue.
> 
> Thanks,
> Richard
> 
> 
> gcc/
> 	* lra-eliminations.cc (lra_eliminate_regs_1): Use simplify_gen_binary
> 	rather than gen_rtx_PLUS.
OK
jeff

  reply	other threads:[~2023-09-05  5:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-31 15:24 Richard Sandiford
2023-09-05  5:05 ` Jeff Law [this message]
2023-10-18 13:37 ` [Backport RFA] " Richard Sandiford
2023-10-18 13:59   ` Vladimir Makarov

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=06503c0a-48a8-4a86-882d-60263254fc98@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.sandiford@arm.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).