public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/24257]  New: ICE: in extract_insn, at recog.c:2084 with -O -fgcse -fgcse-sm
@ 2005-10-07 15:17 ferdinandw+gcc at gmail dot com
  2005-10-07 15:21 ` [Bug target/24257] [4.1 Regression] " pinskia at gcc dot gnu dot org
                   ` (16 more replies)
  0 siblings, 17 replies; 19+ messages in thread
From: ferdinandw+gcc at gmail dot com @ 2005-10-07 15:17 UTC (permalink / raw)
  To: gcc-bugs

/tmp/gcc41/libexec/gcc/i686-pc-linux-gnu/4.1.0/cc1 -quiet -v icefoo.c -dumpbase
icefoo.c -auxbase icefoo -O -version -fgcse -fgcse-sm -o icefoo.s

GNU C version 4.1.0 20051007 (experimental) (i686-pc-linux-gnu)
        compiled by GNU C version 4.1.0 20051007 (experimental).
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129306
Compiler executable checksum: a278381769db4d67bad1ec630ceb45dd
icefoo.c: In function 'oof':
icefoo.c:23: error: unrecognizable insn:
(insn 47 15 19 0 (set (reg:SI 61)
        (ashift:SI (mem/s/j:SI (reg/v/f:SI 59 [ s ]) [0 <variable>.buf+0 S4
A32])
            (subreg:QI (reg/v:SI 60 [ n ]) 0))) -1 (nil)
    (expr_list:REG_DEAD (reg/v:SI 60 [ n ])
        (nil)))
icefoo.c:23: internal compiler error: in extract_insn, at recog.c:2084

Configured with: ../gcc/configure --prefix=/tmp/gcc41 --enable-languages=c
--disable-nls --enable-checking=assert,rtlflag,misc

========================================================

typedef struct A {
    int buf, left;
} A;

static void flush(A *s, int n)
{
    s->buf <<= n;

    while (s->left < 32) {
        s->buf <<= 8;
        s->left += 8;
    }

    s->buf=0;
}

void oof(A *s, int n)
{
    s->buf = n;
    s->left = n;

    flush(s, n);
}

========================================================


-- 
           Summary: ICE: in extract_insn, at recog.c:2084 with -O -fgcse -
                    fgcse-sm
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ferdinandw+gcc at gmail dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug target/24257] [4.1 Regression] ICE: in extract_insn, at recog.c:2084 with -O -fgcse -fgcse-sm
  2005-10-07 15:17 [Bug rtl-optimization/24257] New: ICE: in extract_insn, at recog.c:2084 with -O -fgcse -fgcse-sm ferdinandw+gcc at gmail dot com
@ 2005-10-07 15:21 ` pinskia at gcc dot gnu dot org
  2005-10-07 23:01 ` janis at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-07 15:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2005-10-07 15:21 -------
Confirmed, 4.0.0 worked.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|rtl-optimization            |target
     Ever Confirmed|0                           |1
  GCC build triplet|i686-pc-linux-gnu           |
   GCC host triplet|i686-pc-linux-gnu           |
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |4.1.0
      Known to work|                            |3.4.0 4.0.0
   Last reconfirmed|0000-00-00 00:00:00         |2005-10-07 15:21:31
               date|                            |
            Summary|ICE: in extract_insn, at    |[4.1 Regression] ICE: in
                   |recog.c:2084 with -O -fgcse |extract_insn, at
                   |-fgcse-sm                   |recog.c:2084 with -O -fgcse
                   |                            |-fgcse-sm
   Target Milestone|---                         |4.1.0


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


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

* [Bug target/24257] [4.1 Regression] ICE: in extract_insn, at recog.c:2084 with -O -fgcse -fgcse-sm
  2005-10-07 15:17 [Bug rtl-optimization/24257] New: ICE: in extract_insn, at recog.c:2084 with -O -fgcse -fgcse-sm ferdinandw+gcc at gmail dot com
  2005-10-07 15:21 ` [Bug target/24257] [4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-10-07 23:01 ` janis at gcc dot gnu dot org
  2005-10-07 23:03 ` pinskia at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: janis at gcc dot gnu dot org @ 2005-10-07 23:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from janis at gcc dot gnu dot org  2005-10-07 23:01 -------
A regression hunt identified this patch from hubicka@gcc.gnu.org:

  http://gcc.gnu.org/ml/gcc-cvs/2005-07/msg01082.html


-- 

janis at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu dot
                   |                            |org


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


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

* [Bug target/24257] [4.1 Regression] ICE: in extract_insn, at recog.c:2084 with -O -fgcse -fgcse-sm
  2005-10-07 15:17 [Bug rtl-optimization/24257] New: ICE: in extract_insn, at recog.c:2084 with -O -fgcse -fgcse-sm ferdinandw+gcc at gmail dot com
  2005-10-07 15:21 ` [Bug target/24257] [4.1 Regression] " pinskia at gcc dot gnu dot org
  2005-10-07 23:01 ` janis at gcc dot gnu dot org
@ 2005-10-07 23:03 ` pinskia at gcc dot gnu dot org
  2005-10-11  6:41 ` uros at kss-loka dot si
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-07 23:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2005-10-07 23:03 -------
Hmm, maybe this is not a target bug after all but a latent bug in gcse store
motion.


-- 


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


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

* [Bug target/24257] [4.1 Regression] ICE: in extract_insn, at recog.c:2084 with -O -fgcse -fgcse-sm
  2005-10-07 15:17 [Bug rtl-optimization/24257] New: ICE: in extract_insn, at recog.c:2084 with -O -fgcse -fgcse-sm ferdinandw+gcc at gmail dot com
                   ` (2 preceding siblings ...)
  2005-10-07 23:03 ` pinskia at gcc dot gnu dot org
@ 2005-10-11  6:41 ` uros at kss-loka dot si
  2005-10-11  8:55 ` uros at kss-loka dot si
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: uros at kss-loka dot si @ 2005-10-11  6:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from uros at kss-loka dot si  2005-10-11 06:41 -------
>From _.c.10.gcse1:


STORE_MOTION  delete insn in BB 0:
      (insn 17 15 47 0 (parallel [
                        (set (mem/s:SI (reg/v/f:SI 59 [ s ]) [3
<variable>.buf+0 S4 A32])
                            (ashift:SI (mem/s:SI (reg/v/f:SI 59 [ s ]) [3
<variable>.buf+0 S4 A32])
                                (subreg:QI (reg/v:SI 60 [ n ]) 0)))
                        (clobber (reg:CC 17 flags))
                    ]) 288 {*ashlsi3_1} (nil)
                (nil))

STORE MOTION  replaced with insn:
      (insn 47 17 19 0 (set (reg:SI 61)
                    (ashift:SI (mem/s:SI (reg/v/f:SI 59 [ s ]) [3
<variable>.buf+0 S4 A32])
                        (subreg:QI (reg/v:SI 60 [ n ]) 0))) -1 (nil)
                (nil))

gcse-sm blindly converted valid insn pattern into unrecognized insn pattern.


-- 


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


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

* [Bug target/24257] [4.1 Regression] ICE: in extract_insn, at recog.c:2084 with -O -fgcse -fgcse-sm
  2005-10-07 15:17 [Bug rtl-optimization/24257] New: ICE: in extract_insn, at recog.c:2084 with -O -fgcse -fgcse-sm ferdinandw+gcc at gmail dot com
                   ` (3 preceding siblings ...)
  2005-10-11  6:41 ` uros at kss-loka dot si
@ 2005-10-11  8:55 ` uros at kss-loka dot si
  2005-10-12  6:49 ` [Bug middle-end/24257] " uros at kss-loka dot si
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: uros at kss-loka dot si @ 2005-10-11  8:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from uros at kss-loka dot si  2005-10-11 08:55 -------
(In reply to comment #4)
>
> gcse-sm blindly converted valid insn pattern into unrecognized insn pattern.

  The problem is in gcse.c, function replace_store_insn(), line 6294:

6293  mem = smexpr->pattern;
6294  insn = gen_move_insn (reg, SET_SRC (single_set (del)));
6295  insn = emit_insn_after (insn, del);

This code does not handle parallels and replaces only destination of an insn
pattern. "ashlsi3" pattern, as defined in i386.md also requires operand 0 and
operand 1 to match (via ix86_expand_binary_operator ()).


-- 

uros at kss-loka dot si changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |uros at kss-loka dot si


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


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

* [Bug middle-end/24257] [4.1 Regression] ICE: in extract_insn, at recog.c:2084 with -O -fgcse -fgcse-sm
  2005-10-07 15:17 [Bug rtl-optimization/24257] New: ICE: in extract_insn, at recog.c:2084 with -O -fgcse -fgcse-sm ferdinandw+gcc at gmail dot com
                   ` (4 preceding siblings ...)
  2005-10-11  8:55 ` uros at kss-loka dot si
@ 2005-10-12  6:49 ` uros at kss-loka dot si
  2005-10-21 11:13 ` [Bug rtl-optimization/24257] [4.1 Regression] ICE: in extract_insn " steven at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: uros at kss-loka dot si @ 2005-10-12  6:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from uros at kss-loka dot si  2005-10-12 06:49 -------
This is IMO middle-end problem, store motion should check if new insn pattern
is valid, before old insn is replaced.


-- 

uros at kss-loka dot si changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |middle-end


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


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

* [Bug rtl-optimization/24257] [4.1 Regression] ICE: in extract_insn with -O -fgcse -fgcse-sm
  2005-10-07 15:17 [Bug rtl-optimization/24257] New: ICE: in extract_insn, at recog.c:2084 with -O -fgcse -fgcse-sm ferdinandw+gcc at gmail dot com
                   ` (5 preceding siblings ...)
  2005-10-12  6:49 ` [Bug middle-end/24257] " uros at kss-loka dot si
@ 2005-10-21 11:13 ` steven at gcc dot gnu dot org
  2005-10-21 12:48   ` Andrew Pinski
  2005-10-21 12:48 ` pinskia at physics dot uc dot edu
                   ` (9 subsequent siblings)
  16 siblings, 1 reply; 19+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-10-21 11:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from steven at gcc dot gnu dot org  2005-10-21 11:13 -------
I do not consider this to be a regression, really.

Store motion was always broken.  There are reasons for why it is disabled
by default ;-)

pinskia, what do you think: Keep this marked as a regression, or not?


-- 


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


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

* [Bug rtl-optimization/24257] [4.1 Regression] ICE: in extract_insn with -O -fgcse -fgcse-sm
  2005-10-07 15:17 [Bug rtl-optimization/24257] New: ICE: in extract_insn, at recog.c:2084 with -O -fgcse -fgcse-sm ferdinandw+gcc at gmail dot com
                   ` (6 preceding siblings ...)
  2005-10-21 11:13 ` [Bug rtl-optimization/24257] [4.1 Regression] ICE: in extract_insn " steven at gcc dot gnu dot org
@ 2005-10-21 12:48 ` pinskia at physics dot uc dot edu
  2005-10-31  6:05 ` mmitchel at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: pinskia at physics dot uc dot edu @ 2005-10-21 12:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pinskia at gcc dot gnu dot org  2005-10-21 12:48 -------
Subject: Re:  [4.1 Regression] ICE: in extract_insn with -O -fgcse -fgcse-sm


On Oct 21, 2005, at 7:13 AM, steven at gcc dot gnu dot org wrote:

> pinskia, what do you think: Keep this marked as a regression, or not?


I think it should be kept as a regression.  Otherwise it will get
overlooked before it is time to turn on store motion.

-- Pinski


-- 


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


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

* Re: [Bug rtl-optimization/24257] [4.1 Regression] ICE: in extract_insn with -O -fgcse -fgcse-sm
  2005-10-21 11:13 ` [Bug rtl-optimization/24257] [4.1 Regression] ICE: in extract_insn " steven at gcc dot gnu dot org
@ 2005-10-21 12:48   ` Andrew Pinski
  0 siblings, 0 replies; 19+ messages in thread
From: Andrew Pinski @ 2005-10-21 12:48 UTC (permalink / raw)
  To: gcc-bugzilla; +Cc: gcc-bugs


On Oct 21, 2005, at 7:13 AM, steven at gcc dot gnu dot org wrote:

> pinskia, what do you think: Keep this marked as a regression, or not?


I think it should be kept as a regression.  Otherwise it will get
overlooked before it is time to turn on store motion.

-- Pinski


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

* [Bug rtl-optimization/24257] [4.1 Regression] ICE: in extract_insn with -O -fgcse -fgcse-sm
  2005-10-07 15:17 [Bug rtl-optimization/24257] New: ICE: in extract_insn, at recog.c:2084 with -O -fgcse -fgcse-sm ferdinandw+gcc at gmail dot com
                   ` (7 preceding siblings ...)
  2005-10-21 12:48 ` pinskia at physics dot uc dot edu
@ 2005-10-31  6:05 ` mmitchel at gcc dot gnu dot org
  2005-11-16  8:52 ` steven at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-10-31  6:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from mmitchel at gcc dot gnu dot org  2005-10-31 06:05 -------
How broken is -fgcse-sm?  Is it broken enough that it should not only be
disabled by default but also hard-wired off on release branches?


-- 


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


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

* [Bug rtl-optimization/24257] [4.1 Regression] ICE: in extract_insn with -O -fgcse -fgcse-sm
  2005-10-07 15:17 [Bug rtl-optimization/24257] New: ICE: in extract_insn, at recog.c:2084 with -O -fgcse -fgcse-sm ferdinandw+gcc at gmail dot com
                   ` (8 preceding siblings ...)
  2005-10-31  6:05 ` mmitchel at gcc dot gnu dot org
@ 2005-11-16  8:52 ` steven at gcc dot gnu dot org
  2005-12-18  2:53 ` [Bug rtl-optimization/24257] [4.1/4.2 " pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-11-16  8:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from steven at gcc dot gnu dot org  2005-11-16 08:52 -------
Re. comment #9

GCSE store motion is very broken, and it's really been like that for a long
time.  And it doesn't really do much, either, when you turn it on.  Sadly we
have nothing to replace it right now except the loop store motion in
tree-ssa-loop-im.c, which doesn't work as well as GCSE store motion due to
alias representation issues at the tree level.

We're just going to have to fix this one IMHO.


-- 


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


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

* [Bug rtl-optimization/24257] [4.1/4.2 Regression] ICE: in extract_insn with -O -fgcse -fgcse-sm
  2005-10-07 15:17 [Bug rtl-optimization/24257] New: ICE: in extract_insn, at recog.c:2084 with -O -fgcse -fgcse-sm ferdinandw+gcc at gmail dot com
                   ` (9 preceding siblings ...)
  2005-11-16  8:52 ` steven at gcc dot gnu dot org
@ 2005-12-18  2:53 ` pinskia at gcc dot gnu dot org
  2006-01-08  0:45 ` steven at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-18  2:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from pinskia at gcc dot gnu dot org  2005-12-18 02:53 -------
*** Bug 25475 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |drab at kepler dot fjfi dot
                   |                            |cvut dot cz


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


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

* [Bug rtl-optimization/24257] [4.1/4.2 Regression] ICE: in extract_insn with -O -fgcse -fgcse-sm
  2005-10-07 15:17 [Bug rtl-optimization/24257] New: ICE: in extract_insn, at recog.c:2084 with -O -fgcse -fgcse-sm ferdinandw+gcc at gmail dot com
                   ` (10 preceding siblings ...)
  2005-12-18  2:53 ` [Bug rtl-optimization/24257] [4.1/4.2 " pinskia at gcc dot gnu dot org
@ 2006-01-08  0:45 ` steven at gcc dot gnu dot org
  2006-01-09 21:26 ` steven at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu dot org @ 2006-01-08  0:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from steven at gcc dot gnu dot org  2006-01-08 00:45 -------
I looked at what is going on here with "GNU C version 4.1.0 20060107
(prerelease) (x86_64-unknown-linux-gnu)"

We produce the invalid insn in replace_store_insn, where we have:
(gdb) p debug_rtx(del)
(insn 19 17 21 0 (parallel [
            (set (mem/s:SI (reg/v/f:DI 63 [ s ]) [3 <variable>.buf+0 S4 A32])
                (ashift:SI (mem/s:SI (reg/v/f:DI 63 [ s ]) [3 <variable>.buf+0
S4 A32])
                    (subreg:QI (reg/v:SI 64 [ n ]) 0)))
            (clobber (reg:CC 17 flags))
        ]) 413 {*ashlsi3_1} (nil)
    (nil))

gen_move_insn is used to produce a move for this:
replace_store_insn (reg=0x2aaaaafcc000, del=0x2aaaaafc73c0, bb=0x2aaaaafb9780,
    smexpr=0xcdae70) at gcse.c:6296
6296      mem = smexpr->pattern;
(gdb) p debug_rtx(del)
(insn 19 17 21 0 (parallel [
            (set (mem/s:SI (reg/v/f:DI 63 [ s ]) [3 <variable>.buf+0 S4 A32])
                (ashift:SI (mem/s:SI (reg/v/f:DI 63 [ s ]) [3 <variable>.buf+0
S4 A32])
                    (subreg:QI (reg/v:SI 64 [ n ]) 0)))
            (clobber (reg:CC 17 flags))
        ]) 413 {*ashlsi3_1} (nil)
    (nil))
$8 = void
(gdb) next
6297      insn = gen_move_insn (reg, SET_SRC (single_set (del)));
(gdb) p debug_rtx(mem)
(mem/s:SI (reg/v/f:DI 63 [ s ]) [3 <variable>.buf+0 S4 A32])
$9 = void
(gdb) next
6298      insn = emit_insn_after (insn, del);
(gdb) p debug_rtx(insn)
(insn 57 0 0 (set (reg:SI 65)
        (ashift:SI (mem/s:SI (reg/v/f:DI 63 [ s ]) [3 <variable>.buf+0 S4 A32])
            (subreg:QI (reg/v:SI 64 [ n ]) 0))) -1 (nil)
    (nil))
$10 = void
(gdb) p recog_memoized (insn)
$11 = -1


-- 


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



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

* [Bug rtl-optimization/24257] [4.1/4.2 Regression] ICE: in extract_insn with -O -fgcse -fgcse-sm
  2005-10-07 15:17 [Bug rtl-optimization/24257] New: ICE: in extract_insn, at recog.c:2084 with -O -fgcse -fgcse-sm ferdinandw+gcc at gmail dot com
                   ` (11 preceding siblings ...)
  2006-01-08  0:45 ` steven at gcc dot gnu dot org
@ 2006-01-09 21:26 ` steven at gcc dot gnu dot org
  2006-01-14 11:04 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu dot org @ 2006-01-09 21:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from steven at gcc dot gnu dot org  2006-01-09 21:25 -------
Created an attachment (id=10601)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10601&action=view)
proposed fix

This is my throw-over-the-wall completely untested proposed fix
for PR24257.  We end up ICEing when we try to emit an invalid
SET insns where the SET_DEST is a REG and the SET_SRC is taken
from a store to a MEM.

When the SET_SRC of that store can't be assigned to a register,
we should not consider the store movable.  This happens for
example with x86/AMD64 memory read-modify-write instructions,
i.e. "MEM <- MEM op x".


-- 


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



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

* [Bug rtl-optimization/24257] [4.1/4.2 Regression] ICE: in extract_insn with -O -fgcse -fgcse-sm
  2005-10-07 15:17 [Bug rtl-optimization/24257] New: ICE: in extract_insn, at recog.c:2084 with -O -fgcse -fgcse-sm ferdinandw+gcc at gmail dot com
                   ` (12 preceding siblings ...)
  2006-01-09 21:26 ` steven at gcc dot gnu dot org
@ 2006-01-14 11:04 ` rguenth at gcc dot gnu dot org
  2006-01-14 19:27 ` [Bug rtl-optimization/24257] [4.1 " pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-01-14 11:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from rguenth at gcc dot gnu dot org  2006-01-14 11:04 -------
Subject: Bug 24257

Author: rguenth
Date: Sat Jan 14 11:04:16 2006
New Revision: 109701

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109701
Log:
2006-01-14  Steven Bosscher  <stevenb.gcc@gmail.com>
        Richard Guenther  <rguenther@suse.de>

        PR rtl-optimization/24257
        * gcse.c (find_moveable_store): Only consider a store movable
        when the SET_SRC of the insn can be assigned to a register.

        * gcc.dg/torture/pr24257.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr24257.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gcse.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug rtl-optimization/24257] [4.1 Regression] ICE: in extract_insn with -O -fgcse -fgcse-sm
  2005-10-07 15:17 [Bug rtl-optimization/24257] New: ICE: in extract_insn, at recog.c:2084 with -O -fgcse -fgcse-sm ferdinandw+gcc at gmail dot com
                   ` (13 preceding siblings ...)
  2006-01-14 11:04 ` rguenth at gcc dot gnu dot org
@ 2006-01-14 19:27 ` pinskia at gcc dot gnu dot org
  2006-01-16  9:37 ` rguenth at gcc dot gnu dot org
  2006-01-16  9:37 ` rguenth at gcc dot gnu dot org
  16 siblings, 0 replies; 19+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-14 19:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from pinskia at gcc dot gnu dot org  2006-01-14 19:27 -------
Fixed on the mainline at least.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.1/4.2 Regression] ICE: in|[4.1 Regression] ICE: in
                   |extract_insn with -O -fgcse |extract_insn with -O -fgcse
                   |-fgcse-sm                   |-fgcse-sm


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


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

* [Bug rtl-optimization/24257] [4.1 Regression] ICE: in extract_insn with -O -fgcse -fgcse-sm
  2005-10-07 15:17 [Bug rtl-optimization/24257] New: ICE: in extract_insn, at recog.c:2084 with -O -fgcse -fgcse-sm ferdinandw+gcc at gmail dot com
                   ` (14 preceding siblings ...)
  2006-01-14 19:27 ` [Bug rtl-optimization/24257] [4.1 " pinskia at gcc dot gnu dot org
@ 2006-01-16  9:37 ` rguenth at gcc dot gnu dot org
  2006-01-16  9:37 ` rguenth at gcc dot gnu dot org
  16 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-01-16  9:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from rguenth at gcc dot gnu dot org  2006-01-16 09:37 -------
Subject: Bug 24257

Author: rguenth
Date: Mon Jan 16 09:37:10 2006
New Revision: 109744

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109744
Log:
2006-01-16  Steven Bosscher  <stevenb.gcc@gmail.com>
        Richard Guenther  <rguenther@suse.de>

        PR rtl-optimization/24257
        * gcse.c (find_moveable_store): Only consider a store movable
        when the SET_SRC of the insn can be assigned to a register.

        * gcc.dg/torture/pr24257.c: New testcase.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/torture/pr24257.c
Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/gcse.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug rtl-optimization/24257] [4.1 Regression] ICE: in extract_insn with -O -fgcse -fgcse-sm
  2005-10-07 15:17 [Bug rtl-optimization/24257] New: ICE: in extract_insn, at recog.c:2084 with -O -fgcse -fgcse-sm ferdinandw+gcc at gmail dot com
                   ` (15 preceding siblings ...)
  2006-01-16  9:37 ` rguenth at gcc dot gnu dot org
@ 2006-01-16  9:37 ` rguenth at gcc dot gnu dot org
  16 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-01-16  9:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from rguenth at gcc dot gnu dot org  2006-01-16 09:37 -------
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2006-01-16  9:37 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-07 15:17 [Bug rtl-optimization/24257] New: ICE: in extract_insn, at recog.c:2084 with -O -fgcse -fgcse-sm ferdinandw+gcc at gmail dot com
2005-10-07 15:21 ` [Bug target/24257] [4.1 Regression] " pinskia at gcc dot gnu dot org
2005-10-07 23:01 ` janis at gcc dot gnu dot org
2005-10-07 23:03 ` pinskia at gcc dot gnu dot org
2005-10-11  6:41 ` uros at kss-loka dot si
2005-10-11  8:55 ` uros at kss-loka dot si
2005-10-12  6:49 ` [Bug middle-end/24257] " uros at kss-loka dot si
2005-10-21 11:13 ` [Bug rtl-optimization/24257] [4.1 Regression] ICE: in extract_insn " steven at gcc dot gnu dot org
2005-10-21 12:48   ` Andrew Pinski
2005-10-21 12:48 ` pinskia at physics dot uc dot edu
2005-10-31  6:05 ` mmitchel at gcc dot gnu dot org
2005-11-16  8:52 ` steven at gcc dot gnu dot org
2005-12-18  2:53 ` [Bug rtl-optimization/24257] [4.1/4.2 " pinskia at gcc dot gnu dot org
2006-01-08  0:45 ` steven at gcc dot gnu dot org
2006-01-09 21:26 ` steven at gcc dot gnu dot org
2006-01-14 11:04 ` rguenth at gcc dot gnu dot org
2006-01-14 19:27 ` [Bug rtl-optimization/24257] [4.1 " pinskia at gcc dot gnu dot org
2006-01-16  9:37 ` rguenth at gcc dot gnu dot org
2006-01-16  9:37 ` rguenth 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).