public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Vladimir Makarov <vmakarov@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Fix LRA ICE in lra_substitute_pseudo on DEBUG_INSN (PR rtl-optimization/83723)
Date: Thu, 15 Feb 2018 23:33:00 -0000	[thread overview]
Message-ID: <df4f7537-adc7-280b-263c-7cb169cecbf6@redhat.com> (raw)
In-Reply-To: <20180214210144.GD5867@tucnak>



On 02/14/2018 04:01 PM, Jakub Jelinek wrote:
> Hi!
>
> Unlike normal insns where SUBREGs must properly validate, in
> DEBUG_INSNs we allow arbitrary SUBREGs, either the dwarf2out code
> will be able to use it, or it will just punt.  The reason for it is
> among other things that during analysis we usually need to ignore
> debug insns, so can't reject some optimization just because it would
> create subreg in debug insn that doesn't validate, and resetting such
> debug insns is too big hammer.
>
> On the following testcase on i?86 we ICE because we have a SFmode
> pseudo and want to use a XFmode new_reg for it and such subreg doesn't
> validate on i386.
>
> Fixed by using gen_rtx_raw_SUBREG in DEBUG_INSNs as other passes do.
> We don't have gen_lowpart_raw_SUBREG, so the patch inlines what
> gen_lowpart_SUBREG does to compute the offset and uses gen_rtx_{,raw_}SUBREG
> in all cases.  Bootstrapped/regtested on x86_64-linux and i686-linux, ok for
> trunk?
Yes.  Thank you, Jakub.
> 2018-02-14  Jakub Jelinek  <jakub@redhat.com>
>
> 	PR rtl-optimization/83723
> 	* lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
> 	* lra.c (lra_substitute_pseudo): Likewise.  If true, use
> 	gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
> 	recursive calls.
> 	(lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
> 	callers.
> 	* lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
>
> 	* gcc.dg/pr83723.c: New test.
>

      reply	other threads:[~2018-02-15 23:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-15  0:49 Jakub Jelinek
2018-02-15 23:33 ` Vladimir Makarov [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=df4f7537-adc7-280b-263c-7cb169cecbf6@redhat.com \
    --to=vmakarov@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.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).