public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/40934]  New: ICE in get_hard_regnum, at reg-stack.c:741
@ 2009-08-01 20:06 sezeroz at gmail dot com
  2009-08-01 20:11 ` [Bug c/40934] " sezeroz at gmail dot com
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: sezeroz at gmail dot com @ 2009-08-01 20:06 UTC (permalink / raw)
  To: gcc-bugs

I got these ICEs while testing gcc-4.5 in compiling the uhexen2 source:

$ CC=gcc45 make h2 1> /dev/null
view.c: In function 'V_RenderView':
view.c:1084:1: internal compiler error: in get_hard_regnum, at reg-stack.c:741
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [view.o] Error 1

 or:

$ CC=gcc45 make glh2 1> /dev/null
gl_rsurf.c: In function 'GL_BuildLightmaps':
gl_rsurf.c:1627:1: internal compiler error: in get_hard_regnum, at
reg-stack.c:741
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [gl_rsurf.o] Error 1

The C sources mentioned are at
http://uhexen2.cvs.sourceforge.net/viewvc/uhexen2/hexen2/ .   I can't give you
an exact line number, because the line numbers reported by gcc are the closing
braces of the functions.  This is noticed on Fedora 9.  Relevant software
environment:  binutils-2.18.50.0.6-7.fc9.i386, gmp-4.2.2-7.fc9.i386,
mpfr-2.3.2-0.1.fc9.i386, gcc-4.3.0-8.i386 (boot compiler)

$ gcc45 -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc45.r150333/configure --prefix=/home/ozzie/opt/gcc450
--program-suffix=45 --bindir=/home/ozzie/bin --with-local-prefix=/usr
--disable-nls --enable-shared --enable-threads --enable-languages=c,c++
Thread model: posix
gcc version 4.5.0 20090801 (experimental) r150333 (GCC)

If any more info is needed, I would try to provide.


-- 
           Summary: ICE in get_hard_regnum, at reg-stack.c:741
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sezeroz 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=40934


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

* [Bug c/40934] ICE in get_hard_regnum, at reg-stack.c:741
  2009-08-01 20:06 [Bug c/40934] New: ICE in get_hard_regnum, at reg-stack.c:741 sezeroz at gmail dot com
@ 2009-08-01 20:11 ` sezeroz at gmail dot com
  2009-08-01 20:12 ` sezeroz at gmail dot com
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: sezeroz at gmail dot com @ 2009-08-01 20:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from sezeroz at gmail dot com  2009-08-01 20:11 -------
Created an attachment (id=18282)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18282&action=view)
preprocessed source

(Preprocessed source.  Exact command line was:
gcc45 -c -march=i586 -O2 -Wall -DNDEBUG -ffast-math -fexpensive-optimizations
-falign-loops=2 -falign-jumps=2 -falign-functions=2 -fomit-frame-pointer  
-DUSE_INTEL_ASM -DSDLQUAKE -D_MIDI_SDLMIXER  -I/usr/include/SDL -D_GNU_SOURCE=1
-D_REENTRANT -I/usr/X11R6/include -I.  -o view.o view.c )


-- 


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


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

* [Bug c/40934] ICE in get_hard_regnum, at reg-stack.c:741
  2009-08-01 20:06 [Bug c/40934] New: ICE in get_hard_regnum, at reg-stack.c:741 sezeroz at gmail dot com
  2009-08-01 20:11 ` [Bug c/40934] " sezeroz at gmail dot com
@ 2009-08-01 20:12 ` sezeroz at gmail dot com
  2009-08-01 20:26 ` [Bug target/40934] " sezeroz at gmail dot com
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: sezeroz at gmail dot com @ 2009-08-01 20:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from sezeroz at gmail dot com  2009-08-01 20:12 -------
Created an attachment (id=18283)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18283&action=view)
generated *s file

(generated *.s file)


-- 


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


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

* [Bug target/40934] ICE in get_hard_regnum, at reg-stack.c:741
  2009-08-01 20:06 [Bug c/40934] New: ICE in get_hard_regnum, at reg-stack.c:741 sezeroz at gmail dot com
  2009-08-01 20:11 ` [Bug c/40934] " sezeroz at gmail dot com
  2009-08-01 20:12 ` sezeroz at gmail dot com
@ 2009-08-01 20:26 ` sezeroz at gmail dot com
  2009-08-01 22:04 ` [Bug target/40934] [4.5 Regression] " ubizjak at gmail dot com
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: sezeroz at gmail dot com @ 2009-08-01 20:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from sezeroz at gmail dot com  2009-08-01 20:26 -------
Some further info: The problem is specifically related to the -ffast-math
option.  Only by removing it, the compilation succeeds.


-- 


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


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

* [Bug target/40934] [4.5 Regression] ICE in get_hard_regnum, at reg-stack.c:741
  2009-08-01 20:06 [Bug c/40934] New: ICE in get_hard_regnum, at reg-stack.c:741 sezeroz at gmail dot com
                   ` (2 preceding siblings ...)
  2009-08-01 20:26 ` [Bug target/40934] " sezeroz at gmail dot com
@ 2009-08-01 22:04 ` ubizjak at gmail dot com
  2009-08-01 22:25 ` ubizjak at gmail dot com
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ubizjak at gmail dot com @ 2009-08-01 22:04 UTC (permalink / raw)
  To: gcc-bugs

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



------- Comment #4 from ubizjak at gmail dot com  2009-08-01 22:04 -------
Confirmed as gcc-4.5 regression.

Reduced testcase:

--cut here--
extern struct
{
  int demoplayback;

  float movetype;
  int cameramode;

  float idealpitch;
  float pitchvel;
  int nodrift;
  int paused;
  int onground;
} cl;

void V_DriftRoll (void);

static void
V_DriftPitch (void)
{
  float move;

  if (!cl.onground || cl.movetype == 5 || cl.movetype == 8
       || cl.demoplayback || cl.nodrift )
    return;

  move = cl.pitchvel;

  if (cl.idealpitch > 0)
    ;
  else if (cl.idealpitch < 0)
    {
      if (move > -cl.idealpitch)
          cl.pitchvel = 0;
    }
}


V_RenderView (void)
{
  if (!cl.paused  && !cl.cameramode)
    {
      V_DriftPitch ();
      V_DriftRoll ();
    }
} 
--cut here--

gcc -m32 -march=i586 -ffast-math -O2:

test.c: In function ‘V_RenderView’:
test.c:45:1: internal compiler error: in get_hard_regnum, at reg-stack.c:741
Please submit a full bug report,


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-08-01 22:04:31
               date|                            |
            Summary|ICE in get_hard_regnum, at  |[4.5 Regression] ICE in
                   |reg-stack.c:741             |get_hard_regnum, at reg-
                   |                            |stack.c:741
   Target Milestone|---                         |4.5.0


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


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

* [Bug target/40934] [4.5 Regression] ICE in get_hard_regnum, at reg-stack.c:741
  2009-08-01 20:06 [Bug c/40934] New: ICE in get_hard_regnum, at reg-stack.c:741 sezeroz at gmail dot com
                   ` (3 preceding siblings ...)
  2009-08-01 22:04 ` [Bug target/40934] [4.5 Regression] " ubizjak at gmail dot com
@ 2009-08-01 22:25 ` ubizjak at gmail dot com
  2009-08-01 22:39 ` ubizjak at gmail dot com
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ubizjak at gmail dot com @ 2009-08-01 22:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from ubizjak at gmail dot com  2009-08-01 22:25 -------
The backtrace:

#0  fancy_abort (file=0xc59e30 "../../gcc-svn/trunk/gcc/reg-stack.c", line=741,
function=0xc5a5f0 "get_hard_regnum") at
../../gcc-svn/trunk/gcc/diagnostic.c:729
#1  0x0000000000708a5e in get_hard_regnum (regstack=<value optimized out>,
reg=<value optimized out>) at ../../gcc-svn/trunk/gcc/reg-stack.c:741
#2  0x000000000070b6cd in subst_stack_regs_pat (insn=0x7ffff28ba960,
regstack=0x7fffffffddd0, pat=<value optimized out>) at
../../gcc-svn/trunk/gcc/reg-stack.c:1889
#3  0x000000000070c703 in subst_stack_regs (insn=0x7ffff28ba960,
regstack=0x7fffffffddd0) at ../../gcc-svn/trunk/gcc/reg-stack.c:2319

We call get_hard_regnum() with:

(gdb) p debug_rtx (*dest)
(pc)

that register comes as a target from insn:

(jump_insn:TI 52 50 56 11 test.c:32 (parallel [
            (set (pc)
                (if_then_else (le (reg/v:SF 9 st(1) [orig:64 move ] [64])
                        (reg:SF 8 st [80]))
                    (label_ref:SI 60)
                    (pc)))
            (clobber (reg:CCFP 18 fpsr))
            (clobber (reg:CCFP 17 flags))
            (clobber (reg:HI 0 ax))
        ]) 626 {*fp_jcc_3_387} (expr_list:REG_DEAD (reg/v:SF 9 st(1) [orig:64
move ] [64])

So, this part of reg-stack.c is kind of wrong:

            /* If the comparison operator is an FP comparison operator,
               it is handled correctly by compare_for_stack_reg () who
               will move the destination to the top of stack. But if the
               comparison operator is not an FP comparison operator, we
               have to handle it here.  */
            if (get_hard_regnum (regstack, *dest) >= FIRST_STACK_REG
                && REGNO (*dest) != regstack->reg[regstack->top])


-- 


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


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

* [Bug target/40934] [4.5 Regression] ICE in get_hard_regnum, at reg-stack.c:741
  2009-08-01 20:06 [Bug c/40934] New: ICE in get_hard_regnum, at reg-stack.c:741 sezeroz at gmail dot com
                   ` (4 preceding siblings ...)
  2009-08-01 22:25 ` ubizjak at gmail dot com
@ 2009-08-01 22:39 ` ubizjak at gmail dot com
  2009-08-01 22:58 ` bonzini at gnu dot org
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ubizjak at gmail dot com @ 2009-08-01 22:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from ubizjak at gmail dot com  2009-08-01 22:38 -------
(In reply to comment #5)

> (jump_insn:TI 52 50 56 11 test.c:32 (parallel [
>             (set (pc)
>                 (if_then_else (le (reg/v:SF 9 st(1) [orig:64 move ] [64])
>                         (reg:SF 8 st [80]))
>                     (label_ref:SI 60)
>                     (pc)))
>             (clobber (reg:CCFP 18 fpsr))
>             (clobber (reg:CCFP 17 flags))
>             (clobber (reg:HI 0 ax))
>         ]) 626 {*fp_jcc_3_387} (expr_list:REG_DEAD (reg/v:SF 9 st(1) [orig:64
> move ] [64])

This instruction should be split waaay before reg-stack. The problem was
probably introduced by the patch below:

2009-06-28  Paolo Bonzini  <bonzini@gnu.org>

        * config/i386/i386.h (enum ix86_fpcmp_strategy): New.
        * config/i386/i386.md (cbranchxf4, cstorexf4, cbranch<MODEF>4,
        cstore<MODEF>4, mov<X87MODEF>cc): Change predicate to
        ix86_fp_comparison_operator.
        (*fp_jcc_1_mixed, *fp_jcc_1_sse, *fp_jcc_1_387, *fp_jcc_2_mixed,
        *fp_jcc_2_sse, *fp_jcc_2_387): Delete
        (*fp_jcc_3_387, *fp_jcc_4_387, *fp_jcc_5_387, *fp_jcc_6_387,
        *fp_jcc_7_387, *fp_jcc_8<MODEF>_387): Eliminate call to
        !ix86_use_fcomi_compare, change ix86_fp_jump_nontrivial_p call
        to !TARGET_CMOVE, change predicate to ix86_fp_comparison_operator.
        (related splits): Change predicate to ix86_fp_comparison_operator.
        * config/i386/predicates.md: Use ix86_trivial_fp_comparison_operator
        instead of ix86_fp_comparison_codes.
        ...

Let's ask Paolo.


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bonzini at gnu dot org


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


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

* [Bug target/40934] [4.5 Regression] ICE in get_hard_regnum, at reg-stack.c:741
  2009-08-01 20:06 [Bug c/40934] New: ICE in get_hard_regnum, at reg-stack.c:741 sezeroz at gmail dot com
                   ` (5 preceding siblings ...)
  2009-08-01 22:39 ` ubizjak at gmail dot com
@ 2009-08-01 22:58 ` bonzini at gnu dot org
  2009-08-01 23:11 ` sezeroz at gmail dot com
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: bonzini at gnu dot org @ 2009-08-01 22:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from bonzini at gnu dot org  2009-08-01 22:57 -------
Hmm, Pentium is not a cmove target and it doesn't like sahf, so
ix86_fp_comparison_operator matches all comparison operators.  I would have
thought then that fp_jcc_3_387 would match:

(define_insn "*fp_jcc_3_387"
  [(set (pc)
        (if_then_else (match_operator 0 "ix86_fp_comparison_operator"
                        [(match_operand 1 "register_operand" "f")
                         (match_operand 2 "nonimmediate_operand" "fm")])
          (label_ref (match_operand 3 "" ""))
          (pc)))
   (clobber (reg:CCFP FPSR_REG))
   (clobber (reg:CCFP FLAGS_REG))
   (clobber (match_scratch:HI 4 "=a"))]
  "TARGET_80387
   && (GET_MODE (operands[1]) == SFmode || GET_MODE (operands[1]) == DFmode)
   && GET_MODE (operands[1]) == GET_MODE (operands[2])
   && SELECT_CC_MODE (GET_CODE (operands[0]),
                      operands[1], operands[2]) == CCFPmode
   && !TARGET_CMOVE"
  "#")

Maybe the instruction was optimized for size:

enum ix86_fpcmp_strategy
ix86_fp_comparison_strategy (enum rtx_code code ATTRIBUTE_UNUSED)
{
  /* Do fcomi/sahf based test when profitable.  */
  ...
  if (TARGET_SAHF && (TARGET_USE_SAHF || optimize_insn_for_size_p ()))
    return IX86_FPCMP_SAHF;

  return IX86_FPCMP_ARITH;
}


-- 

bonzini at gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2009-08-01 22:04:31         |2009-08-01 22:57:49
               date|                            |


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


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

* [Bug target/40934] [4.5 Regression] ICE in get_hard_regnum, at reg-stack.c:741
  2009-08-01 20:06 [Bug c/40934] New: ICE in get_hard_regnum, at reg-stack.c:741 sezeroz at gmail dot com
                   ` (6 preceding siblings ...)
  2009-08-01 22:58 ` bonzini at gnu dot org
@ 2009-08-01 23:11 ` sezeroz at gmail dot com
  2009-08-01 23:41 ` bonzini at gnu dot org
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: sezeroz at gmail dot com @ 2009-08-01 23:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from sezeroz at gmail dot com  2009-08-01 23:11 -------
(In reply to comment #7)
> Hmm, Pentium is not a cmove target and it doesn't like sahf, so

For the record, the ICE happens with -march=i[3|4|5]86, but not for i686 or
better.


-- 


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


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

* [Bug target/40934] [4.5 Regression] ICE in get_hard_regnum, at reg-stack.c:741
  2009-08-01 20:06 [Bug c/40934] New: ICE in get_hard_regnum, at reg-stack.c:741 sezeroz at gmail dot com
                   ` (7 preceding siblings ...)
  2009-08-01 23:11 ` sezeroz at gmail dot com
@ 2009-08-01 23:41 ` bonzini at gnu dot org
  2009-08-01 23:59 ` bonzini at gnu dot org
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: bonzini at gnu dot org @ 2009-08-01 23:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from bonzini at gnu dot org  2009-08-01 23:41 -------
I confirm that the SAHF instruction sequence is generated because of
optimize_insn_for_size_p () == 1.


-- 


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


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

* [Bug target/40934] [4.5 Regression] ICE in get_hard_regnum, at reg-stack.c:741
  2009-08-01 20:06 [Bug c/40934] New: ICE in get_hard_regnum, at reg-stack.c:741 sezeroz at gmail dot com
                   ` (8 preceding siblings ...)
  2009-08-01 23:41 ` bonzini at gnu dot org
@ 2009-08-01 23:59 ` bonzini at gnu dot org
  2009-08-02  0:15 ` bonzini at gnu dot org
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: bonzini at gnu dot org @ 2009-08-01 23:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from bonzini at gnu dot org  2009-08-01 23:59 -------
Minimized testcase:

extern double host_frametime;
extern float pitchvel;
V_DriftPitch (float delta, float move)
{
  if (!delta)
    move = host_frametime;
  if (delta > 0)
    ;
  else if (delta < 0 && move > -delta)
    pitchvel = 0;
}

compiled with

./cc1  -march=i586 -O2 -ffast-math


-- 


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


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

* [Bug target/40934] [4.5 Regression] ICE in get_hard_regnum, at reg-stack.c:741
  2009-08-01 20:06 [Bug c/40934] New: ICE in get_hard_regnum, at reg-stack.c:741 sezeroz at gmail dot com
                   ` (9 preceding siblings ...)
  2009-08-01 23:59 ` bonzini at gnu dot org
@ 2009-08-02  0:15 ` bonzini at gnu dot org
  2009-08-02  9:32 ` sezeroz at gmail dot com
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: bonzini at gnu dot org @ 2009-08-02  0:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from bonzini at gnu dot org  2009-08-02 00:15 -------
This is the simplest patch that can possibly work:

Index: ../../gcc/config/i386/i386.c
===================================================================
--- ../../gcc/config/i386/i386.c        (revision 150334)
+++ ../../gcc/config/i386/i386.c        (working copy)
@@ -14619,7 +14619,7 @@ ix86_fp_comparison_strategy (enum rtx_co
   if (TARGET_CMOVE)
     return IX86_FPCMP_COMI;

-  if (TARGET_SAHF && (TARGET_USE_SAHF || optimize_insn_for_size_p ()))
+  if (TARGET_SAHF && (TARGET_USE_SAHF || optimize_function_for_size_p (cfun)))
     return IX86_FPCMP_SAHF;

   return IX86_FPCMP_ARITH;


I'm not sure if there is another patch that can work. :-)

Uros, do you think it's fine?  I don't think that non-hot FP jumps are that
common.  Definitely in the minimized testcase it's not a great prediction...


-- 


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


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

* [Bug target/40934] [4.5 Regression] ICE in get_hard_regnum, at reg-stack.c:741
  2009-08-01 20:06 [Bug c/40934] New: ICE in get_hard_regnum, at reg-stack.c:741 sezeroz at gmail dot com
                   ` (10 preceding siblings ...)
  2009-08-02  0:15 ` bonzini at gnu dot org
@ 2009-08-02  9:32 ` sezeroz at gmail dot com
  2009-08-02 10:00 ` ubizjak at gmail dot com
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: sezeroz at gmail dot com @ 2009-08-02  9:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from sezeroz at gmail dot com  2009-08-02 09:32 -------
(In reply to comment #11)
> This is the simplest patch that can possibly work:
> 

A quick testing shows that the proposed patch, applied to rev.150333, cures the
ICE for me with -march=i386, i486, i586 and c3.  Didn't do a make check, yet,
though.


-- 


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


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

* [Bug target/40934] [4.5 Regression] ICE in get_hard_regnum, at reg-stack.c:741
  2009-08-01 20:06 [Bug c/40934] New: ICE in get_hard_regnum, at reg-stack.c:741 sezeroz at gmail dot com
                   ` (11 preceding siblings ...)
  2009-08-02  9:32 ` sezeroz at gmail dot com
@ 2009-08-02 10:00 ` ubizjak at gmail dot com
  2009-08-12 18:20 ` sezeroz at gmail dot com
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ubizjak at gmail dot com @ 2009-08-02 10:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from ubizjak at gmail dot com  2009-08-02 09:59 -------
(In reply to comment #11)

> I'm not sure if there is another patch that can work. :-)
> 
> Uros, do you think it's fine?  I don't think that non-hot FP jumps are that
> common.  Definitely in the minimized testcase it's not a great prediction...

Yes, I think this is OK.  optimize_insn_for_size_p () is not stable through RTL
passes, so we either don't split or generate invalid insn in certain cases
(like the one above).

In the above test, we expand via ARITH path, and switch to SAHF somewhere
during optimization passes. Since the comparison in the expanded insn is not
valid for SAHF, it is not split.

And since splitters depend on stable predicates to split expanded sequences, we
have no other choice.


-- 


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


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

* [Bug target/40934] [4.5 Regression] ICE in get_hard_regnum, at reg-stack.c:741
  2009-08-01 20:06 [Bug c/40934] New: ICE in get_hard_regnum, at reg-stack.c:741 sezeroz at gmail dot com
                   ` (12 preceding siblings ...)
  2009-08-02 10:00 ` ubizjak at gmail dot com
@ 2009-08-12 18:20 ` sezeroz at gmail dot com
  2009-08-14 12:14 ` bonzini at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: sezeroz at gmail dot com @ 2009-08-12 18:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from sezeroz at gmail dot com  2009-08-12 18:20 -------
anything new on this?


-- 


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


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

* [Bug target/40934] [4.5 Regression] ICE in get_hard_regnum, at reg-stack.c:741
  2009-08-01 20:06 [Bug c/40934] New: ICE in get_hard_regnum, at reg-stack.c:741 sezeroz at gmail dot com
                   ` (13 preceding siblings ...)
  2009-08-12 18:20 ` sezeroz at gmail dot com
@ 2009-08-14 12:14 ` bonzini at gcc dot gnu dot org
  2009-08-14 12:17 ` bonzini at gnu dot org
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: bonzini at gcc dot gnu dot org @ 2009-08-14 12:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from bonzini at gnu dot org  2009-08-14 12:14 -------
Subject: Bug 40934

Author: bonzini
Date: Fri Aug 14 12:14:04 2009
New Revision: 150754

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150754
Log:
2009-08-14  Paolo Bonzini  <bonzini@gnu.org>

        PR target/40934
        * config/i386/i386.c (ix86_fp_comparison_strategy):
        Only enable/disable sahf at function granularity. 

gcc/testsuite:
2009-08-14  Paolo Bonzini  <bonzini@gnu.org>

        PR target/40934
        * gcc.target/i386/pr40934.c: New.


Added:
    trunk/gcc/testsuite/gcc.target/i386/pr40934.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug target/40934] [4.5 Regression] ICE in get_hard_regnum, at reg-stack.c:741
  2009-08-01 20:06 [Bug c/40934] New: ICE in get_hard_regnum, at reg-stack.c:741 sezeroz at gmail dot com
                   ` (14 preceding siblings ...)
  2009-08-14 12:14 ` bonzini at gcc dot gnu dot org
@ 2009-08-14 12:17 ` bonzini at gnu dot org
  2009-08-14 12:29 ` sezeroz at gmail dot com
  2009-08-16 20:25 ` hjl at gcc dot gnu dot org
  17 siblings, 0 replies; 19+ messages in thread
From: bonzini at gnu dot org @ 2009-08-14 12:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from bonzini at gnu dot org  2009-08-14 12:17 -------
committed.


-- 

bonzini at gnu dot org changed:

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


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


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

* [Bug target/40934] [4.5 Regression] ICE in get_hard_regnum, at reg-stack.c:741
  2009-08-01 20:06 [Bug c/40934] New: ICE in get_hard_regnum, at reg-stack.c:741 sezeroz at gmail dot com
                   ` (15 preceding siblings ...)
  2009-08-14 12:17 ` bonzini at gnu dot org
@ 2009-08-14 12:29 ` sezeroz at gmail dot com
  2009-08-16 20:25 ` hjl at gcc dot gnu dot org
  17 siblings, 0 replies; 19+ messages in thread
From: sezeroz at gmail dot com @ 2009-08-14 12:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from sezeroz at gmail dot com  2009-08-14 12:28 -------
Thank you all for your hard work.


-- 


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


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

* [Bug target/40934] [4.5 Regression] ICE in get_hard_regnum, at reg-stack.c:741
  2009-08-01 20:06 [Bug c/40934] New: ICE in get_hard_regnum, at reg-stack.c:741 sezeroz at gmail dot com
                   ` (16 preceding siblings ...)
  2009-08-14 12:29 ` sezeroz at gmail dot com
@ 2009-08-16 20:25 ` hjl at gcc dot gnu dot org
  17 siblings, 0 replies; 19+ messages in thread
From: hjl at gcc dot gnu dot org @ 2009-08-16 20:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from hjl at gcc dot gnu dot org  2009-08-16 20:25 -------
Subject: Bug 40934

Author: hjl
Date: Sun Aug 16 20:23:57 2009
New Revision: 150812

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150812
Log:
2009-08-16  H.J. Lu  <hongjiu.lu@intel.com>

        Backport from mainline:
        2009-08-14  Janus Weil  <janus@gcc.gnu.org>

        PR fortran/41070
        * gfortran.dg/structure_constructor_10.f90: New.

        2009-08-14  Paolo Bonzini  <bonzini@gnu.org>

        PR target/40934
        * gcc.target/i386/pr40934.c: New.

        2009-08-13  Janus Weil  <janus@gcc.gnu.org>

        PR fortran/40995
        * gfortran.dg/intrinsic_4.f90: New.

        2009-08-13  Richard Guenther  <rguenther@suse.de>

        PR middle-end/41047
        * gcc.dg/tree-ssa/ssa-ccp-27.c: New testcase.

        2009-08-12  Richard Guenther  <rguenther@suse.de>

        PR tree-optimization/41011
        * gfortran.dg/pr41011.f: New testcase.

        2009-08-10  Richard Guenther  <rguenther@suse.de>

        PR middle-end/41006
        * gcc.c-torture/compile/pr41006-1.c: New testcase.
        * gcc.c-torture/compile/pr41006-2.c: Likewise.

        2009-08-10  Dodji Seketeli  <dodji@redhat.com>

        PR c++/40866
        * g++.dg/expr/stmt-expr-1.C: New test.

        2009-08-09  Ira Rosen  <irar@il.ibm.com>

        PR tree-optimization/41008
        * gcc.dg/vect/O1-pr41008.c: New test.

        2009-08-08  Richard Guenther  <rguenther@suse.de>

        PR tree-optimization/40991
        * g++.dg/torture/pr40991.C: New testcase.

        2009-08-06  Uros Bizjak  <ubizjak@gmail.com>
                    H.J. Lu  <hongjiu.lu@intel.com>

        PR target/40957
        * gcc.target/i386/pr40957.c: New test.

        2009-08-06  Richard Guenther  <rguenther@suse.de>

        PR tree-optimization/40964
        * gcc.c-torture/compile/pr40964.c: New testcase.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/expr/stmt-expr-1.C
      - copied unchanged from r150811,
trunk/gcc/testsuite/g++.dg/expr/stmt-expr-1.C
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/torture/pr40991.C
      - copied unchanged from r150811,
trunk/gcc/testsuite/g++.dg/torture/pr40991.C
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr40964.c
      - copied unchanged from r150811,
trunk/gcc/testsuite/gcc.c-torture/compile/pr40964.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr41006-1.c
      - copied unchanged from r150811,
trunk/gcc/testsuite/gcc.c-torture/compile/pr41006-1.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr41006-2.c
      - copied unchanged from r150811,
trunk/gcc/testsuite/gcc.c-torture/compile/pr41006-2.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-27.c
      - copied unchanged from r150811,
trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-27.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/vect/O1-pr41008.c
      - copied unchanged from r150811,
trunk/gcc/testsuite/gcc.dg/vect/O1-pr41008.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.target/i386/pr40934.c
      - copied unchanged from r150811,
trunk/gcc/testsuite/gcc.target/i386/pr40934.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.target/i386/pr40957.c
      - copied unchanged from r150811,
trunk/gcc/testsuite/gcc.target/i386/pr40957.c
    branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/intrinsic_4.f90
      - copied unchanged from r150811,
trunk/gcc/testsuite/gfortran.dg/intrinsic_4.f90
    branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/pr41011.f
      - copied unchanged from r150811,
trunk/gcc/testsuite/gfortran.dg/pr41011.f
   
branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/structure_constructor_10.f90
      - copied unchanged from r150811,
trunk/gcc/testsuite/gfortran.dg/structure_constructor_10.f90
Modified:
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog


-- 


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


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

end of thread, other threads:[~2009-08-16 20:25 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-01 20:06 [Bug c/40934] New: ICE in get_hard_regnum, at reg-stack.c:741 sezeroz at gmail dot com
2009-08-01 20:11 ` [Bug c/40934] " sezeroz at gmail dot com
2009-08-01 20:12 ` sezeroz at gmail dot com
2009-08-01 20:26 ` [Bug target/40934] " sezeroz at gmail dot com
2009-08-01 22:04 ` [Bug target/40934] [4.5 Regression] " ubizjak at gmail dot com
2009-08-01 22:25 ` ubizjak at gmail dot com
2009-08-01 22:39 ` ubizjak at gmail dot com
2009-08-01 22:58 ` bonzini at gnu dot org
2009-08-01 23:11 ` sezeroz at gmail dot com
2009-08-01 23:41 ` bonzini at gnu dot org
2009-08-01 23:59 ` bonzini at gnu dot org
2009-08-02  0:15 ` bonzini at gnu dot org
2009-08-02  9:32 ` sezeroz at gmail dot com
2009-08-02 10:00 ` ubizjak at gmail dot com
2009-08-12 18:20 ` sezeroz at gmail dot com
2009-08-14 12:14 ` bonzini at gcc dot gnu dot org
2009-08-14 12:17 ` bonzini at gnu dot org
2009-08-14 12:29 ` sezeroz at gmail dot com
2009-08-16 20:25 ` hjl 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).