public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/48830] New: [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack
@ 2011-04-30  1:36 hp at gcc dot gnu.org
  2011-04-30  1:56 ` [Bug target/48830] " hp at gcc dot gnu.org
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: hp at gcc dot gnu.org @ 2011-04-30  1:36 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.4/4.6 Regression] unrecognized insn storing fp
                    (simd) reg in SImode to stack
           Product: gcc
           Version: 4.4.5
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hp@gcc.gnu.org
            Target: sparc64-unknown-linux-gnu


Created attachment 24148
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24148
preprocessed trivially reduced test-case

Most likely also 4.5 and "4.7" but I don't have a corresponding build tree
handy.
Flagged as a regression because 4.3.5 builds it.

Anyway, observe the following ICE with the attachment compiled with "cc1
-fpreprocessed -mptr64 -mstack-bias -mlong-double-128 -m64 -mcpu=ultrasparc
-mvis -O2 -o rc_stat.s rcs5.i" (for 4.4.5):

 rc_stat_xsum_acc
Analyzing compilation unit
Performing interprocedural optimizations
 <visibility> <early_local_cleanups> <summary generate> <cp> <inline>
<static-var> <pure-const>Assembling functions:
 rc_stat_xsum_acc
/home/hp/rcs5.i: In function 'rc_stat_xsum_acc':
/home/hp/rcs5.i:66: error: insn does not satisfy its constraints:
(insn 1288 208 218 11 /home/hp/rcs5.i:48 (set (mem/c:SI (plus:DI (reg/f:DI 30
%fp)
                (const_int 1915 [0x77b])) [149 %sfp+-132 S4 A32])
        (reg:SI 71 %f39 [+4 ])) 50 {*movsi_insn} (nil))
/home/hp/rcs5.i:66: internal compiler error: in reload_cse_simplify_operands,
at postreload.c:396
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug target/48830] [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack
  2011-04-30  1:36 [Bug target/48830] New: [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack hp at gcc dot gnu.org
@ 2011-04-30  1:56 ` hp at gcc dot gnu.org
  2011-04-30 12:59 ` mikpe at it dot uu.se
                   ` (20 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: hp at gcc dot gnu.org @ 2011-04-30  1:56 UTC (permalink / raw)
  To: gcc-bugs

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

Hans-Peter Nilsson <hp at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.04.30 01:44:06
      Known to work|                            |4.3.5
     Ever Confirmed|0                           |1
      Known to fail|                            |4.4.0, 4.6.0

--- Comment #1 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2011-04-30 01:44:06 UTC ---
Also observed to fail with 4.4.0 and 4.6.0 (r170836) and succeed with "gcc
version 4.3.6 20110410 (prerelease)" (a snapshot).


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug target/48830] [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack
  2011-04-30  1:36 [Bug target/48830] New: [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack hp at gcc dot gnu.org
  2011-04-30  1:56 ` [Bug target/48830] " hp at gcc dot gnu.org
@ 2011-04-30 12:59 ` mikpe at it dot uu.se
  2011-05-01  0:36 ` [Bug target/48830] [4.4/4.5/4.6/4.7 Regression] unrecognized insn: storing invalid upper fp " hp at gcc dot gnu.org
                   ` (19 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: mikpe at it dot uu.se @ 2011-04-30 12:59 UTC (permalink / raw)
  To: gcc-bugs

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

Mikael Pettersson <mikpe at it dot uu.se> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikpe at it dot uu.se

--- Comment #2 from Mikael Pettersson <mikpe at it dot uu.se> 2011-04-30 12:58:02 UTC ---
Also ICEs gcc-4.7-20110423 and gcc-4.5-20110421.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug target/48830] [4.4/4.5/4.6/4.7 Regression] unrecognized insn: storing invalid upper fp reg in SImode to stack
  2011-04-30  1:36 [Bug target/48830] New: [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack hp at gcc dot gnu.org
  2011-04-30  1:56 ` [Bug target/48830] " hp at gcc dot gnu.org
  2011-04-30 12:59 ` mikpe at it dot uu.se
@ 2011-05-01  0:36 ` hp at gcc dot gnu.org
  2011-05-01  0:40 ` hp at gcc dot gnu.org
                   ` (18 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: hp at gcc dot gnu.org @ 2011-05-01  0:36 UTC (permalink / raw)
  To: gcc-bugs

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

Hans-Peter Nilsson <hp at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot       |hp at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #4 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2011-05-01 00:34:15 UTC ---
Created attachment 24155
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24155
Tentative patch fixing the sparc CANNOT_CHANGE_MODE_CLASS, untested.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug target/48830] [4.4/4.5/4.6/4.7 Regression] unrecognized insn: storing invalid upper fp reg in SImode to stack
  2011-04-30  1:36 [Bug target/48830] New: [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack hp at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-05-01  0:36 ` [Bug target/48830] [4.4/4.5/4.6/4.7 Regression] unrecognized insn: storing invalid upper fp " hp at gcc dot gnu.org
@ 2011-05-01  0:40 ` hp at gcc dot gnu.org
  2011-05-01  1:51 ` hp at gcc dot gnu.org
                   ` (17 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: hp at gcc dot gnu.org @ 2011-05-01  0:40 UTC (permalink / raw)
  To: gcc-bugs

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

Hans-Peter Nilsson <hp at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.4/4.6 Regression]        |[4.4/4.5/4.6/4.7
                   |unrecognized insn storing   |Regression] unrecognized
                   |fp (simd) reg in SImode to  |insn: storing invalid upper
                   |stack                       |fp reg in SImode to stack

--- Comment #3 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2011-05-01 00:31:15 UTC ---
I had a look.  The code needs to split %f34 and get the two SImode quantities
that happen to be in %f34.  This should be done by a stack intermediate, but
when doing that, reloads trips and falls.

The root problem seems to be that the SPARC port allows a change from DImode to
SImode for regno 66 (%f34) (by CANNOT_CHANGE_MODE_CLASS) even though there's no
%f35 and no way to move around such a small quantity, also specified through
HARD_REGNO_MODE_OK(either of 66 and 67, SImode) being 0.  So, reload happily
wraps the reg in a subreg and calls emit_move_insn.

It seems wrong for the sparc CANNOT_CHANGE_MODE_CLASS to not refuse this
change, but also wrong for subreg_get_info to not consult HARD_REGNO_MODE_OK
when setting info.representable_p (as "%f35" is flagged as representable, which
it isn't according to the related field comment in rtl.h).  There's a kludge
involving the latter, that implies that such a non-representable register is
expected to be flagged as representable (ugh!), see last "return -1" in
simplify_subreg_regno.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug target/48830] [4.4/4.5/4.6/4.7 Regression] unrecognized insn: storing invalid upper fp reg in SImode to stack
  2011-04-30  1:36 [Bug target/48830] New: [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack hp at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-05-01  0:40 ` hp at gcc dot gnu.org
@ 2011-05-01  1:51 ` hp at gcc dot gnu.org
  2011-05-01  1:52 ` hp at gcc dot gnu.org
                   ` (16 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: hp at gcc dot gnu.org @ 2011-05-01  1:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2011-05-01 01:50:46 UTC ---
Created attachment 24156
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24156
Tentative patch fixing subreg_get_info, untested.

This likely has fallout for sparc 32-bit, as it removes the kludge mentioned
above; I haven't even had a look whether that's still needed.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug target/48830] [4.4/4.5/4.6/4.7 Regression] unrecognized insn: storing invalid upper fp reg in SImode to stack
  2011-04-30  1:36 [Bug target/48830] New: [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack hp at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2011-05-01  1:51 ` hp at gcc dot gnu.org
@ 2011-05-01  1:52 ` hp at gcc dot gnu.org
  2011-05-01  8:47 ` ebotcazou at gcc dot gnu.org
                   ` (15 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: hp at gcc dot gnu.org @ 2011-05-01  1:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2011-05-01 01:52:16 UTC ---
Either patch fixes the test-case. Both should eventually be applied to trunk,
but perhaps just the sparc one to branches.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug target/48830] [4.4/4.5/4.6/4.7 Regression] unrecognized insn: storing invalid upper fp reg in SImode to stack
  2011-04-30  1:36 [Bug target/48830] New: [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack hp at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2011-05-01  1:52 ` hp at gcc dot gnu.org
@ 2011-05-01  8:47 ` ebotcazou at gcc dot gnu.org
  2011-05-01 11:14 ` hp at gcc dot gnu.org
                   ` (14 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2011-05-01  8:47 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |ebotcazou at gcc dot
                   |                            |gnu.org

--- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-05-01 08:46:28 UTC ---
> The root problem seems to be that the SPARC port allows a change from DImode to
> SImode for regno 66 (%f34) (by CANNOT_CHANGE_MODE_CLASS) even though there's no
> %f35 and no way to move around such a small quantity, also specified through
> HARD_REGNO_MODE_OK(either of 66 and 67, SImode) being 0.

Right, CANNOT_CHANGE_MODE_CLASS doesn't need to prohibit mode changes already
forbidden by HARD_REGNO_MODE_OK.  I'm a bit reluctant to tweak the macro on the
release branches because this is a sensitive one.

> It seems wrong for the sparc CANNOT_CHANGE_MODE_CLASS to not refuse this
> change, but also wrong for subreg_get_info to not consult HARD_REGNO_MODE_OK
> when setting info.representable_p (as "%f35" is flagged as representable, which
> it isn't according to the related field comment in rtl.h).  There's a kludge
> involving the latter, that implies that such a non-representable register is
> expected to be flagged as representable (ugh!), see last "return -1" in
> simplify_subreg_regno.

Indeed, looks like SPARC gets bitten by its own laziness here.  I think that we
should first try to get rid of the kludge on the mainline.  I'll investigate on
my side.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug target/48830] [4.4/4.5/4.6/4.7 Regression] unrecognized insn: storing invalid upper fp reg in SImode to stack
  2011-04-30  1:36 [Bug target/48830] New: [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack hp at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2011-05-01  8:47 ` ebotcazou at gcc dot gnu.org
@ 2011-05-01 11:14 ` hp at gcc dot gnu.org
  2011-05-01 11:26 ` joseph at codesourcery dot com
                   ` (13 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: hp at gcc dot gnu.org @ 2011-05-01 11:14 UTC (permalink / raw)
  To: gcc-bugs

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

Hans-Peter Nilsson <hp at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW

--- Comment #8 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2011-05-01 11:03:45 UTC ---
(In reply to comment #7)
> > The root problem seems to be that the SPARC port allows a change from DImode to
> > SImode for regno 66 (%f34) (by CANNOT_CHANGE_MODE_CLASS)
> I'm a bit reluctant to tweak the macro on the
> release branches because this is a sensitive one.

A quick vetting of uses will hopefully convince you like me: when CLASS is
EXTRA_FP_REGS, for at least 4.4 and trunk all uses seem to be from testing an
"upper" floating-point register number, for which TO has no reason to be
SImode.  Being a port-local change, this seems as safe as it can be.  (Famous
last words.)

BTW incidentally-related: maybe a good time to introduce a register class that
is actually the EXTRA_FP_REGS (the upper ones), with its current contents
renamed to ALL_FP_REGS. See "misnomer" in the sparc.h enum reg_class comment.

> I'll investigate on
> my side.

Very much appreciated.  Feel free to take the bug; I'm unassigning myself as I
can't commit to testing the patches (at least) the next few days.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug target/48830] [4.4/4.5/4.6/4.7 Regression] unrecognized insn: storing invalid upper fp reg in SImode to stack
  2011-04-30  1:36 [Bug target/48830] New: [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack hp at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2011-05-01 11:14 ` hp at gcc dot gnu.org
@ 2011-05-01 11:26 ` joseph at codesourcery dot com
  2011-05-01 12:51 ` ebotcazou at gcc dot gnu.org
                   ` (12 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: joseph at codesourcery dot com @ 2011-05-01 11:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2011-05-01 11:26:02 UTC ---
It's probably a good idea to test patches to subreg_get_info on an e500 
target such as powerpc-eabispe.  I don't *think* e500 is doing anything 
that would be affected by the proposed patch, but what it does with 
subregs is fiddly enough (and is the reason for some of the code in 
subreg_get_info) that any changes to subreg_get_info could easily show up 
problems there.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug target/48830] [4.4/4.5/4.6/4.7 Regression] unrecognized insn: storing invalid upper fp reg in SImode to stack
  2011-04-30  1:36 [Bug target/48830] New: [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack hp at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2011-05-01 11:26 ` joseph at codesourcery dot com
@ 2011-05-01 12:51 ` ebotcazou at gcc dot gnu.org
  2011-05-29 20:14 ` ebotcazou at gcc dot gnu.org
                   ` (11 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2011-05-01 12:51 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |ebotcazou at gcc dot
                   |gnu.org                     |gnu.org
   Target Milestone|---                         |4.6.1

--- Comment #10 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-05-01 12:42:36 UTC ---
> A quick vetting of uses will hopefully convince you like me: when CLASS is
> EXTRA_FP_REGS, for at least 4.4 and trunk all uses seem to be from testing an
> "upper" floating-point register number, for which TO has no reason to be
> SImode.

That's what I'm not convinced of.  In 64-bit mode, the 'e' constraint is mapped
to EXTRA_FP_REGS, not FP_REGS, so this class cannot be used to distinguish
lower from upper regs in a bunch of FP insns.

I don't think the bug is serious enough as to warrant any risk on old (4.4/4.5)
release branches; a simple workaround is to replace -O2 with -O on the command
line.  But I agree that fixing it in 4.6.1 would be desirable.

> BTW incidentally-related: maybe a good time to introduce a register class that
> is actually the EXTRA_FP_REGS (the upper ones), with its current contents
> renamed to ALL_FP_REGS. See "misnomer" in the sparc.h enum reg_class comment.

This would be sort of an earthquake in the back-end though.

> Very much appreciated.  Feel free to take the bug; I'm unassigning myself as I
> can't commit to testing the patches (at least) the next few days.

OK, I'm taking it.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug target/48830] [4.4/4.5/4.6/4.7 Regression] unrecognized insn: storing invalid upper fp reg in SImode to stack
  2011-04-30  1:36 [Bug target/48830] New: [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack hp at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2011-05-01 12:51 ` ebotcazou at gcc dot gnu.org
@ 2011-05-29 20:14 ` ebotcazou at gcc dot gnu.org
  2011-05-30 18:33 ` [Bug rtl-optimization/48830] " ebotcazou at gcc dot gnu.org
                   ` (10 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2011-05-29 20:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-05-29 20:01:45 UTC ---
Author: ebotcazou
Date: Sun May 29 20:01:41 2011
New Revision: 174414

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174414
Log:
    PR target/48830
    * rtlanal.c (simplify_subreg_regno): Adjust comment.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/rtlanal.c


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug rtl-optimization/48830] [4.4/4.5/4.6/4.7 Regression] unrecognized insn: storing invalid upper fp reg in SImode to stack
  2011-04-30  1:36 [Bug target/48830] New: [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack hp at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2011-05-29 20:14 ` ebotcazou at gcc dot gnu.org
@ 2011-05-30 18:33 ` ebotcazou at gcc dot gnu.org
  2011-06-01 19:47 ` rsandifo at gcc dot gnu.org
                   ` (9 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2011-05-30 18:33 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |rtl-optimization

--- Comment #12 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-05-30 17:54:19 UTC ---
Recategorizing.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug rtl-optimization/48830] [4.4/4.5/4.6/4.7 Regression] unrecognized insn: storing invalid upper fp reg in SImode to stack
  2011-04-30  1:36 [Bug target/48830] New: [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack hp at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2011-05-30 18:33 ` [Bug rtl-optimization/48830] " ebotcazou at gcc dot gnu.org
@ 2011-06-01 19:47 ` rsandifo at gcc dot gnu.org
  2011-06-01 20:28 ` [Bug rtl-optimization/48830] [4.4/4.5/4.6 regression] " ebotcazou at gcc dot gnu.org
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2011-06-01 19:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 2011-06-01 19:47:22 UTC ---
Author: rsandifo
Date: Wed Jun  1 19:47:19 2011
New Revision: 174540

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174540
Log:
gcc/
    PR rtl-optimization/48830
    PR rtl-optimization/48808
    PR rtl-optimization/48792
    * reload.c (push_reload): Check contains_reg_of_mode.
    * reload1.c (strip_paradoxical_subreg): New function.
    (gen_reload_chain_without_interm_reg_p): Use it to handle
    paradoxical subregs.
    (emit_output_reload_insns, gen_reload): Likewise.

gcc/testsuite/
2011-06-01  Eric Botcazou  <ebotcazou@adacore.com>
        Hans-Peter Nilsson  <hp@axis.com>

    PR rtl-optimization/48830
    * gcc.target/sparc/ultrasp12.c: New test.

Added:
    trunk/gcc/testsuite/gcc.target/sparc/ultrasp12.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/reload.c
    trunk/gcc/reload1.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug rtl-optimization/48830] [4.4/4.5/4.6 regression] unrecognized insn: storing invalid upper fp reg in SImode to stack
  2011-04-30  1:36 [Bug target/48830] New: [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack hp at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2011-06-01 19:47 ` rsandifo at gcc dot gnu.org
@ 2011-06-01 20:28 ` ebotcazou at gcc dot gnu.org
  2011-06-12 13:36 ` [Bug rtl-optimization/48830] [4.4/4.5/4.6 regression] unrecognized insn: storing invalid upper FP reg in SImode rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2011-06-01 20:28 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|49226                       |
            Summary|[4.4/4.5/4.6/4.7            |[4.4/4.5/4.6 regression]
                   |Regression] unrecognized    |unrecognized insn: storing
                   |insn: storing invalid upper |invalid upper fp reg in
                   |fp reg in SImode to stack   |SImode to stack

--- Comment #14 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-06-01 20:27:06 UTC ---
Fixed on the mainline by Richard.  This is a reload patch so backporting it to
the branches is IMO not really an option, at least in the immediate future. 
And
I don't think that modifying CANNOT_CHANGE_MODE_CLASS is one either.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug rtl-optimization/48830] [4.4/4.5/4.6 regression] unrecognized insn: storing invalid upper FP reg in SImode
  2011-04-30  1:36 [Bug target/48830] New: [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack hp at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2011-06-01 20:28 ` [Bug rtl-optimization/48830] [4.4/4.5/4.6 regression] " ebotcazou at gcc dot gnu.org
@ 2011-06-12 13:36 ` rguenth at gcc dot gnu.org
  2011-06-27 16:05 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-06-12 13:36 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug rtl-optimization/48830] [4.4/4.5/4.6 regression] unrecognized insn: storing invalid upper FP reg in SImode
  2011-04-30  1:36 [Bug target/48830] New: [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack hp at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2011-06-12 13:36 ` [Bug rtl-optimization/48830] [4.4/4.5/4.6 regression] unrecognized insn: storing invalid upper FP reg in SImode rguenth at gcc dot gnu.org
@ 2011-06-27 16:05 ` jakub at gcc dot gnu.org
  2011-07-25 14:20 ` ebotcazou at gcc dot gnu.org
                   ` (5 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-06-27 16:05 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.6.1                       |4.6.2

--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-06-27 12:33:12 UTC ---
GCC 4.6.1 is being released.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug rtl-optimization/48830] [4.4/4.5/4.6 regression] unrecognized insn: storing invalid upper FP reg in SImode
  2011-04-30  1:36 [Bug target/48830] New: [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack hp at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2011-06-27 16:05 ` jakub at gcc dot gnu.org
@ 2011-07-25 14:20 ` ebotcazou at gcc dot gnu.org
  2011-10-26 18:14 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2011-07-25 14:20 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
         AssignedTo|ebotcazou at gcc dot        |unassigned at gcc dot
                   |gnu.org                     |gnu.org


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug rtl-optimization/48830] [4.4/4.5/4.6 regression] unrecognized insn: storing invalid upper FP reg in SImode
  2011-04-30  1:36 [Bug target/48830] New: [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack hp at gcc dot gnu.org
                   ` (16 preceding siblings ...)
  2011-07-25 14:20 ` ebotcazou at gcc dot gnu.org
@ 2011-10-26 18:14 ` jakub at gcc dot gnu.org
  2012-03-01 15:39 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-10-26 18:14 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.6.2                       |4.6.3

--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-10-26 17:14:01 UTC ---
GCC 4.6.2 is being released.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug rtl-optimization/48830] [4.4/4.5/4.6 regression] unrecognized insn: storing invalid upper FP reg in SImode
  2011-04-30  1:36 [Bug target/48830] New: [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack hp at gcc dot gnu.org
                   ` (17 preceding siblings ...)
  2011-10-26 18:14 ` jakub at gcc dot gnu.org
@ 2012-03-01 15:39 ` jakub at gcc dot gnu.org
  2012-07-19 13:56 ` [Bug rtl-optimization/48830] [4.6 " martin at netbsd dot org
                   ` (2 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-03-01 15:39 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.6.3                       |4.6.4

--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-01 14:39:23 UTC ---
GCC 4.6.3 is being released.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug rtl-optimization/48830] [4.6 regression] unrecognized insn: storing invalid upper FP reg in SImode
  2011-04-30  1:36 [Bug target/48830] New: [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack hp at gcc dot gnu.org
                   ` (18 preceding siblings ...)
  2012-03-01 15:39 ` jakub at gcc dot gnu.org
@ 2012-07-19 13:56 ` martin at netbsd dot org
  2012-07-19 15:28 ` ebotcazou at gcc dot gnu.org
  2013-04-12 16:18 ` jakub at gcc dot gnu.org
  21 siblings, 0 replies; 23+ messages in thread
From: martin at netbsd dot org @ 2012-07-19 13:56 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Husemann <martin at netbsd dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |martin at netbsd dot org

--- Comment #18 from Martin Husemann <martin at netbsd dot org> 2012-07-19 13:56:11 UTC ---
I see something similar with gcc 4.5.3 when compiling mrtg:

./src/rateup.c:1136:1: error: insn does not satisfy its constraints:
(insn 11219 11218 3096 307 ./src/rateup.c:913 (set (mem/c:SI (reg:DI 2 %g2) [23
%sfp+-10660 S4 A32])
        (reg:SI 65 %f33 [+4 ])) 50 {*movsi_insn} (nil))
./src/rateup.c:1136:1: internal compiler error: in
reload_cse_simplify_operands, at postreload.c:396

(this has originally been reported as http://gnats.netbsd.org/46719)

Is this the samme issue? Any chance of a fix for the 4.5 branch?


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug rtl-optimization/48830] [4.6 regression] unrecognized insn: storing invalid upper FP reg in SImode
  2011-04-30  1:36 [Bug target/48830] New: [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack hp at gcc dot gnu.org
                   ` (19 preceding siblings ...)
  2012-07-19 13:56 ` [Bug rtl-optimization/48830] [4.6 " martin at netbsd dot org
@ 2012-07-19 15:28 ` ebotcazou at gcc dot gnu.org
  2013-04-12 16:18 ` jakub at gcc dot gnu.org
  21 siblings, 0 replies; 23+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-07-19 15:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #19 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-07-19 15:28:24 UTC ---
> I see something similar with gcc 4.5.3 when compiling mrtg:
> 
> ./src/rateup.c:1136:1: error: insn does not satisfy its constraints:
> (insn 11219 11218 3096 307 ./src/rateup.c:913 (set (mem/c:SI (reg:DI 2 %g2) [23
> %sfp+-10660 S4 A32])
>         (reg:SI 65 %f33 [+4 ])) 50 {*movsi_insn} (nil))
> ./src/rateup.c:1136:1: internal compiler error: in
> reload_cse_simplify_operands, at postreload.c:396
> 
> (this has originally been reported as http://gnats.netbsd.org/46719)
> 
> Is this the samme issue? Any chance of a fix for the 4.5 branch?

This indeed looks like the same issue.  But no fix is planned for 4.5.x (the
branch is now closed) or 4.6.x (too risky).  The workaround is usually trivial
(lower the optimization level).


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug rtl-optimization/48830] [4.6 regression] unrecognized insn: storing invalid upper FP reg in SImode
  2011-04-30  1:36 [Bug target/48830] New: [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack hp at gcc dot gnu.org
                   ` (20 preceding siblings ...)
  2012-07-19 15:28 ` ebotcazou at gcc dot gnu.org
@ 2013-04-12 16:18 ` jakub at gcc dot gnu.org
  21 siblings, 0 replies; 23+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-12 16:18 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.6.4                       |4.7.0

--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-12 16:18:02 UTC ---
The 4.6 branch has been closed, fixed in GCC 4.7.0.


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2013-04-12 16:18 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-30  1:36 [Bug target/48830] New: [4.4/4.6 Regression] unrecognized insn storing fp (simd) reg in SImode to stack hp at gcc dot gnu.org
2011-04-30  1:56 ` [Bug target/48830] " hp at gcc dot gnu.org
2011-04-30 12:59 ` mikpe at it dot uu.se
2011-05-01  0:36 ` [Bug target/48830] [4.4/4.5/4.6/4.7 Regression] unrecognized insn: storing invalid upper fp " hp at gcc dot gnu.org
2011-05-01  0:40 ` hp at gcc dot gnu.org
2011-05-01  1:51 ` hp at gcc dot gnu.org
2011-05-01  1:52 ` hp at gcc dot gnu.org
2011-05-01  8:47 ` ebotcazou at gcc dot gnu.org
2011-05-01 11:14 ` hp at gcc dot gnu.org
2011-05-01 11:26 ` joseph at codesourcery dot com
2011-05-01 12:51 ` ebotcazou at gcc dot gnu.org
2011-05-29 20:14 ` ebotcazou at gcc dot gnu.org
2011-05-30 18:33 ` [Bug rtl-optimization/48830] " ebotcazou at gcc dot gnu.org
2011-06-01 19:47 ` rsandifo at gcc dot gnu.org
2011-06-01 20:28 ` [Bug rtl-optimization/48830] [4.4/4.5/4.6 regression] " ebotcazou at gcc dot gnu.org
2011-06-12 13:36 ` [Bug rtl-optimization/48830] [4.4/4.5/4.6 regression] unrecognized insn: storing invalid upper FP reg in SImode rguenth at gcc dot gnu.org
2011-06-27 16:05 ` jakub at gcc dot gnu.org
2011-07-25 14:20 ` ebotcazou at gcc dot gnu.org
2011-10-26 18:14 ` jakub at gcc dot gnu.org
2012-03-01 15:39 ` jakub at gcc dot gnu.org
2012-07-19 13:56 ` [Bug rtl-optimization/48830] [4.6 " martin at netbsd dot org
2012-07-19 15:28 ` ebotcazou at gcc dot gnu.org
2013-04-12 16:18 ` jakub at gcc dot gnu.org

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).