public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/23233] New: Loop optimisation ICE for subreg addresses
@ 2005-08-04 16:06 rsandifo at gcc dot gnu dot org
  2005-08-04 16:06 ` [Bug rtl-optimization/23233] " rsandifo at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2005-08-04 16:06 UTC (permalink / raw)
  To: gcc-bugs

This testcase causes an ICE at -O2:

void foo (volatile long long *x)
{
  while (*x)
    {
      *x = 0;
      *((volatile char *) 0) = 0;
    }
}

with:

 error: unrecognizable insn:
(insn:HI 25 21 27 2 (set (mem/v:QI (subreg:SI (reg:DI 124) 4) [0 S1 A8])
        (subreg:QI (reg:DI 124) 7)) -1 (nil)
    (expr_list:REG_EQUAL (const_int 0 [0x0])
        (nil)))

The bug is in the loop,c movables code.  There are two loop-invariant
registers with the value 0, one SImode and one DImode.  loop decides
to combine them and replaces uses of the SImode register with the DImode
one.  This turns the address in the MEM from an SImode REG to an
SImode SUBREG of a DImode reg, and powerpc's GO_IF_LEGITIMATE_ADDRESS
doesn't allow that.

-- 
           Summary: Loop optimisation ICE for subreg addresses
           Product: gcc
           Version: 3.4.4
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: rtl-optimization
        AssignedTo: rsandifo at gcc dot gnu dot org
        ReportedBy: rsandifo at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: powerpc-linux-gnu


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


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

* [Bug rtl-optimization/23233] Loop optimisation ICE for subreg addresses
  2005-08-04 16:06 [Bug rtl-optimization/23233] New: Loop optimisation ICE for subreg addresses rsandifo at gcc dot gnu dot org
@ 2005-08-04 16:06 ` rsandifo at gcc dot gnu dot org
  2005-08-04 16:16 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2005-08-04 16:06 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-08-04 16:06:12
               date|                            |


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


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

* [Bug rtl-optimization/23233] Loop optimisation ICE for subreg addresses
  2005-08-04 16:06 [Bug rtl-optimization/23233] New: Loop optimisation ICE for subreg addresses rsandifo at gcc dot gnu dot org
  2005-08-04 16:06 ` [Bug rtl-optimization/23233] " rsandifo at gcc dot gnu dot org
@ 2005-08-04 16:16 ` pinskia at gcc dot gnu dot org
  2005-08-06 11:06 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-04 16:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-04 16:15 -------
Confirmed, I wish loop.c would go away.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |4.0.0 3.3.3 3.1


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


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

* [Bug rtl-optimization/23233] Loop optimisation ICE for subreg addresses
  2005-08-04 16:06 [Bug rtl-optimization/23233] New: Loop optimisation ICE for subreg addresses rsandifo at gcc dot gnu dot org
  2005-08-04 16:06 ` [Bug rtl-optimization/23233] " rsandifo at gcc dot gnu dot org
  2005-08-04 16:16 ` pinskia at gcc dot gnu dot org
@ 2005-08-06 11:06 ` cvs-commit at gcc dot gnu dot org
  2005-08-06 11:09 ` rsandifo at gcc dot gnu dot org
  2005-08-23  1:53 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-08-06 11:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-08-06 11:06 -------
Subject: Bug 23233

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rsandifo@gcc.gnu.org	2005-08-06 11:05:49

Modified files:
	gcc            : ChangeLog loop.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/compile: pr23233-1.c 

Log message:
	PR rtl-optimization/23233
	* loop.c (combine_movables): Require the modes to be the same.
	(move_movables): Remove handling of cases where the replacement
	had a different mode to the original.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9666&r2=2.9667
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/loop.c.diff?cvsroot=gcc&r1=1.538&r2=1.539
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5885&r2=1.5886
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/pr23233-1.c.diff?cvsroot=gcc&r1=1.1&r2=1.2



-- 


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


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

* [Bug rtl-optimization/23233] Loop optimisation ICE for subreg addresses
  2005-08-04 16:06 [Bug rtl-optimization/23233] New: Loop optimisation ICE for subreg addresses rsandifo at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-08-06 11:06 ` cvs-commit at gcc dot gnu dot org
@ 2005-08-06 11:09 ` rsandifo at gcc dot gnu dot org
  2005-08-23  1:53 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2005-08-06 11:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rsandifo at gcc dot gnu dot org  2005-08-06 11:08 -------
Patch applied to mainline.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug rtl-optimization/23233] Loop optimisation ICE for subreg addresses
  2005-08-04 16:06 [Bug rtl-optimization/23233] New: Loop optimisation ICE for subreg addresses rsandifo at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-08-06 11:09 ` rsandifo at gcc dot gnu dot org
@ 2005-08-23  1:53 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-23  1:53 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.1.0


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


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

end of thread, other threads:[~2005-08-23  1:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-04 16:06 [Bug rtl-optimization/23233] New: Loop optimisation ICE for subreg addresses rsandifo at gcc dot gnu dot org
2005-08-04 16:06 ` [Bug rtl-optimization/23233] " rsandifo at gcc dot gnu dot org
2005-08-04 16:16 ` pinskia at gcc dot gnu dot org
2005-08-06 11:06 ` cvs-commit at gcc dot gnu dot org
2005-08-06 11:09 ` rsandifo at gcc dot gnu dot org
2005-08-23  1:53 ` pinskia at gcc dot gnu dot 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).