public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dave at hiauly1 dot hia dot nrc dot ca" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/34091] [4.2/4.3 Regression] ICE in reload_cse_simplify_operands, at postreload.c:392
Date: Thu, 22 Nov 2007 03:13:00 -0000	[thread overview]
Message-ID: <20071122031255.31749.qmail@sourceware.org> (raw)
In-Reply-To: <bug-34091-12387@http.gcc.gnu.org/bugzilla/>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2252 bytes --]



------- Comment #5 from dave at hiauly1 dot hia dot nrc dot ca  2007-11-22 03:12 -------
Subject: Re:   New: [4.2/4.3 Regression] ICE in reload_cse_simplify_operands,
at postreload.c:392

> > paer% gcc-4.2 -c -O s_texfilter.i
> > swrast/s_texfilter.c: In function ‘sample_lambda_2d’:
> > swrast/s_texfilter.c:1420: error: insn does not satisfy its constraints:
> > (insn 2621 1258 1259 96 (set (mem/c:HI (plus:SI (reg/f:SI 30 %r30)
> >                 (const_int -474 [0xfffffe26])) [0 S2 A16])
> >         (reg:HI 68 %fr22)) 53 {*pa.md:3126} (nil)
> >     (nil))
> > swrast/s_texfilter.c:1420: internal compiler error: in
> > reload_cse_simplify_operands, at postreload.c:392
> 
> The simplest fix is probably not to allow QImode and HImode values
> in the floating point registers as there's no instructions that operate
> on them.

I have implemented this, but it doesn't fix the problem.  There
are problems in the backend handling spills for floating floating point
instructions.  The issue has been around for a long time and never
resolved completely.  It's papered over by register copies to
the general registers, and usually we don't get into trouble since
the architecture has quite a few registers.

I made an initial stab at fixing this by tightening up GO_IF_LEGITIMATE_ADDRESS
but I have run into problems with pseudos not being allocated hard registers.
This probably means I don't have the change quite right.  I also have a
problem with paradoxical SUBREGS when the inner register is spilled.  I'm
not clear on how this is to be handled on a big endian target with strict
alignment.  The documentation says reload is supposed to prevent this from
happening, but it doesn't seem to.  I see this with the testcase from this
PR.  It's combine that creates the paradoxical SUBREG.  Tracing back
why reload doesn't allocate a hard register is tough...

I'm going to try another approach.  Use a lax definition for
GO_IF_LEGITIMATE_ADDRESS and try to fix things up using pa_secondary_reload.

I view this as a critical "target" bug.  However, if we find a fix, I
don't think it should be applied to 4.2 and earlier since it's very likely
to break something else.

Dave


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34091


  parent reply	other threads:[~2007-11-22  3:13 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-14  8:51 [Bug target/34091] New: " tbm at cyrius dot com
2007-11-14  8:52 ` [Bug target/34091] " tbm at cyrius dot com
2007-11-14  8:53 ` tbm at cyrius dot com
2007-11-14  8:53 ` tbm at cyrius dot com
2007-11-14 15:58 ` dave at hiauly1 dot hia dot nrc dot ca
2007-11-19  3:51 ` pinskia at gcc dot gnu dot org
2007-11-22  3:13 ` dave at hiauly1 dot hia dot nrc dot ca [this message]
2007-11-24 19:00 ` ebotcazou at gcc dot gnu dot org
2007-11-24 19:27 ` dave at hiauly1 dot hia dot nrc dot ca
2007-11-24 20:31 ` ebotcazou at gcc dot gnu dot org
2007-11-24 21:31 ` dave at hiauly1 dot hia dot nrc dot ca
2007-11-24 21:47 ` ebotcazou at gcc dot gnu dot org
2007-11-24 22:14 ` dave at hiauly1 dot hia dot nrc dot ca
2007-11-24 23:36 ` ebotcazou at gcc dot gnu dot org
2007-11-27  6:01 ` mmitchel at gcc dot gnu dot org
2007-12-05 17:19 ` danglin at gcc dot gnu dot org
2007-12-05 17:42 ` ebotcazou at gcc dot gnu dot org
2007-12-05 19:01 ` dave at hiauly1 dot hia dot nrc dot ca
2007-12-09 18:02 ` danglin at gcc dot gnu dot org
2007-12-09 19:50 ` jakub at gcc dot gnu dot org
2007-12-09 20:39 ` dave at hiauly1 dot hia dot nrc dot ca
2007-12-09 21:31 ` [Bug target/34091] [4.2 " jakub at gcc dot gnu dot org
2007-12-10  3:17 ` danglin at gcc dot gnu dot org
2007-12-10  3:26 ` danglin at gcc dot gnu dot org
2007-12-14  1:02 ` danglin at gcc dot gnu dot org

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=20071122031255.31749.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).