public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/55247] [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90)
  2012-11-09  2:34 [Bug rtl-optimization/55247] New: [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90) hjl.tools at gmail dot com
@ 2012-11-09  2:34 ` hjl.tools at gmail dot com
  2012-11-09  5:09 ` hjl.tools at gmail dot com
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: hjl.tools at gmail dot com @ 2012-11-09  2:34 UTC (permalink / raw)
  To: gcc-bugs


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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.8.0


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

* [Bug rtl-optimization/55247] New: [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90)
@ 2012-11-09  2:34 hjl.tools at gmail dot com
  2012-11-09  2:34 ` [Bug rtl-optimization/55247] " hjl.tools at gmail dot com
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: hjl.tools at gmail dot com @ 2012-11-09  2:34 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55247
           Summary: [4.8 Regression] internal compiler error: Max. number
                    of generated reload insns per insn is achieved (90)
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hjl.tools@gmail.com
                CC: vmakarov@redhat.com


Created attachment 28643
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28643
A testcase

On Linux/x86-64, revision 193341 gave:

/export/build/gnu/gcc-x32-test/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc-x32-test/build-x86_64-linux/gcc/ -mx32 -mtune=generic
-march=x86-64 -maddress-mode=long -c -std=gnu99 -fgnu89-inline  -O3    -fPIC 
-mno-sse -mno-mmx    testcase.i
testcase.i: In function ‘_dl_profile_fixup’:
testcase.i:57:6: warning: implicit declaration of function ‘symbind32’
[-Wimplicit-function-declaration]
      uintptr_t new_value  = symbind32 (&sym,          reloc_result->boundndx, 
        &l->l_audit[cnt].cookie,          &result->l_audit[cnt].cookie,        
 &flags,          strtab2 + defsym->st_name);
      ^
testcase.i:58:3: internal compiler error: Max. number of generated reload insns
per insn is achieved (90)

   }
   ^
0x8d78cd lra_constraints(bool)
    /export/gnu/import/git/gcc/gcc/lra-constraints.c:3381
0x8c8169 lra(_IO_FILE*)
    /export/gnu/import/git/gcc/gcc/lra.c:2274
0x87dc24 do_reload
    /export/gnu/import/git/gcc/gcc/ira.c:4624
0x87de32 rest_of_handle_reload
    /export/gnu/import/git/gcc/gcc/ira.c:4737
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
[hjl@gnu-tools-1 delta-2006.08.03]$


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

* [Bug rtl-optimization/55247] [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90)
  2012-11-09  2:34 [Bug rtl-optimization/55247] New: [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90) hjl.tools at gmail dot com
  2012-11-09  2:34 ` [Bug rtl-optimization/55247] " hjl.tools at gmail dot com
@ 2012-11-09  5:09 ` hjl.tools at gmail dot com
  2012-11-09 19:42 ` vmakarov at redhat dot com
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: hjl.tools at gmail dot com @ 2012-11-09  5:09 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2012-11-09 05:08:29 UTC ---
[hjl@gnu-tools-1 gcc]$ cat /export/gnu/import/delta-2006.08.03/x.c
typedef unsigned int uint32_t;
typedef unsigned int uintptr_t;
typedef uint32_t Elf32_Word;
typedef uint32_t Elf32_Addr;
typedef struct {
  Elf32_Word st_name;
  Elf32_Addr st_value;
  Elf32_Word st_size;
  unsigned char st_other;
} Elf32_Sym;
typedef struct {
  Elf32_Word r_info;
}
Elf32_Rela;
typedef struct {
  union     {
    Elf32_Addr d_ptr;
  }
  d_un;
} Elf32_Dyn;
struct link_map   {
  Elf32_Dyn *l_info[34];
};
typedef struct link_map *lookup_t;
extern void symbind32 (Elf32_Sym *);
void
_dl_profile_fixup (struct link_map *l, Elf32_Word reloc_arg)
{
  const Elf32_Sym *const symtab  = (const void *) (l)->l_info[6]->d_un.d_ptr;
  const Elf32_Rela *const reloc  = (const void *) ((l)->l_info[23]->d_un.d_ptr
+ reloc_arg * sizeof (Elf32_Rela));
  const Elf32_Sym *refsym = &symtab[((reloc->r_info) >> 8)];
  const Elf32_Sym *defsym = refsym;
  Elf32_Sym sym = *defsym;
  symbind32 (&sym);
}
[hjl@gnu-tools-1 gcc]$ ./xgcc -B./ -mx32 -mtune=generic -march=x86-64
-maddress-mode=long -c -std=gnu99 -fgnu89-inline  -O3    -fPIC  -mno-sse
-mno-mmx    /export/gnu/import/delta-2006.08.03/x.c 
/export/gnu/import/delta-2006.08.03/x.c: In function ‘_dl_profile_fixup’:
/export/gnu/import/delta-2006.08.03/x.c:35:1: internal compiler error: Max.
number of generated reload insns per insn is achieved (90)

 }
 ^
0x8d78cd lra_constraints(bool)
    /export/gnu/import/git/gcc/gcc/lra-constraints.c:3381
0x8c8169 lra(_IO_FILE*)
    /export/gnu/import/git/gcc/gcc/lra.c:2274
0x87dc24 do_reload
    /export/gnu/import/git/gcc/gcc/ira.c:4624
0x87de32 rest_of_handle_reload
    /export/gnu/import/git/gcc/gcc/ira.c:4737
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
[hjl@gnu-tools-1 gcc]$ ./xgcc -B./ -mx32 -mtune=generic -march=x86-64
-maddress-mode=long -c -std=gnu99 -fgnu89-inline  -O3    -fPIC  -mno-sse
-mno-mmx    /export/gnu/import/delta-2006.08.03/x.c -mno-lra
[hjl@gnu-tools-1 gcc]$


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

* [Bug rtl-optimization/55247] [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90)
  2012-11-09  2:34 [Bug rtl-optimization/55247] New: [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90) hjl.tools at gmail dot com
  2012-11-09  2:34 ` [Bug rtl-optimization/55247] " hjl.tools at gmail dot com
  2012-11-09  5:09 ` hjl.tools at gmail dot com
@ 2012-11-09 19:42 ` vmakarov at redhat dot com
  2012-11-10  1:32 ` hjl.tools at gmail dot com
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: vmakarov at redhat dot com @ 2012-11-09 19:42 UTC (permalink / raw)
  To: gcc-bugs


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

Vladimir Makarov <vmakarov at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ubizjak at gmail dot com

--- Comment #2 from Vladimir Makarov <vmakarov at redhat dot com> 2012-11-09 19:42:30 UTC ---
Here is the insn in question:

(insn 26 25 27 2 (set (reg:TI 115 [orig:100 *defsym_17 ] [100])
        (mem:TI (zero_extend:DI (reg:SI 98)) [7 *defsym_17+0 S16 A32])) h.i:54
61 {*movti_internal_rex64}

As I understand the first alternative has ! to strongly encourage to use SSE
instead of GENERAL registers.

(define_insn "*movti_internal_rex64"
  [(set (match_operand:TI 0 "nonimmediate_operand" "=!r ,o  ,x,x ,m")
        (match_operand:TI 1 "general_operand"      "riFo,riF,C,xm,x"))]
  "TARGET_64BIT && !(MEM_P (operands[0]) && MEM_P (operands[1]))"

For some reasons, the second alternative does not have !.  I don't know why it
is different from the first alternative.

  For reload it works as it already substituted hard register for the first
operand and in this case it rejects
the 2nd alternative.

(insn 26 25 27 2 (set (reg:TI 0 ax [orig:100 *defsym_17 ] [100])
        (mem:TI (zero_extend:DI (reg:SI 2 cx [98])) [7 *defsym_17+0 S16 A32]))
h.i:54 61 {*movti_internal_rex64}

Adding ! for the second alternative (as I believe it should be) solves the
problem.

(define_insn "*movti_internal_rex64"
  [(set (match_operand:TI 0 "nonimmediate_operand" "=!r ,!o  ,x,x ,m")
        (match_operand:TI 1 "general_operand"      "riFo,riF,C,xm,x"))]
  "TARGET_64BIT && !(MEM_P (operands[0]) && MEM_P (operands[1]))"

Uros, is this change ok for you?  If it is ok I can commit the patch only on
Wednesday (I'll be away for a few days).


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

* [Bug rtl-optimization/55247] [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90)
  2012-11-09  2:34 [Bug rtl-optimization/55247] New: [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90) hjl.tools at gmail dot com
                   ` (2 preceding siblings ...)
  2012-11-09 19:42 ` vmakarov at redhat dot com
@ 2012-11-10  1:32 ` hjl.tools at gmail dot com
  2012-11-10  1:39 ` hjl.tools at gmail dot com
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: hjl.tools at gmail dot com @ 2012-11-10  1:32 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2012-11-10 01:32:06 UTC ---
There are 2 issues here:

1. Should we use

    movdqu    (%eax), %xmm0    # 19    *movti_internal_rex64/4    [length = 5]
    movdqa    %xmm0, (%rsp)    # 29    *movti_internal_rex64/5    [length = 5]

to copy 16 bytes?

2. Should we split *movti_internal_rex64 if -mno-sse is used?


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

* [Bug rtl-optimization/55247] [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90)
  2012-11-09  2:34 [Bug rtl-optimization/55247] New: [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90) hjl.tools at gmail dot com
                   ` (3 preceding siblings ...)
  2012-11-10  1:32 ` hjl.tools at gmail dot com
@ 2012-11-10  1:39 ` hjl.tools at gmail dot com
  2012-11-10  1:58 ` hjl.tools at gmail dot com
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: hjl.tools at gmail dot com @ 2012-11-10  1:39 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2012-11-10 01:39:16 UTC ---
We don't properly handle memory operand in

(insn 19 17 20 2 (set (reg:TI 85 [ *_15 ])
        (mem:TI (zero_extend:DI (reg:SI 82)) [0 *_15+0 S16 A32])) x.i:29 61
{*movti_internal_rex64}
     (expr_list:REG_DEAD (reg:SI 82) 
        (expr_list:REG_EQUIV (mem/c:TI (plus:DI (reg/f:DI 20 frame)
                    (const_int -16 [0xfffffffffffffff0])) [0 sym+0 S16 A64])


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

* [Bug rtl-optimization/55247] [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90)
  2012-11-09  2:34 [Bug rtl-optimization/55247] New: [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90) hjl.tools at gmail dot com
                   ` (4 preceding siblings ...)
  2012-11-10  1:39 ` hjl.tools at gmail dot com
@ 2012-11-10  1:58 ` hjl.tools at gmail dot com
  2012-11-10  2:30 ` hjl.tools at gmail dot com
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: hjl.tools at gmail dot com @ 2012-11-10  1:58 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> 2012-11-10 01:58:31 UTC ---
We fail to see (mem:TI (zero_extend:DI (reg:SI 82))) is offsettable.


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

* [Bug rtl-optimization/55247] [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90)
  2012-11-09  2:34 [Bug rtl-optimization/55247] New: [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90) hjl.tools at gmail dot com
                   ` (5 preceding siblings ...)
  2012-11-10  1:58 ` hjl.tools at gmail dot com
@ 2012-11-10  2:30 ` hjl.tools at gmail dot com
  2012-11-10  9:15 ` ubizjak at gmail dot com
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: hjl.tools at gmail dot com @ 2012-11-10  2:30 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> 2012-11-10 02:30:16 UTC ---
Something like this:

diff --git a/gcc/explow.c b/gcc/explow.c
index 6109832..9ec38f9 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -84,12 +84,22 @@ plus_constant (enum machine_mode mode, rtx x, HOST_WIDE_INT 
c)
   rtx y;
   rtx tem;
   int all_constant = 0;
+  enum machine_mode zero_extend_mode;

   gcc_assert (GET_MODE (x) == VOIDmode || GET_MODE (x) == mode);

   if (c == 0)
     return x;

+  if (GET_CODE (x) == ZERO_EXTEND)
+    {
+      zero_extend_mode = GET_MODE (x);
+      x = XEXP (x, 0);
+      mode = GET_MODE (x);
+    }
+  else
+    zero_extend_mode = VOIDmode;
+
  restart:

   code = GET_CODE (x);
@@ -195,7 +205,11 @@ plus_constant (enum machine_mode mode, rtx x,
HOST_WIDE_INT
 c)
   else if (all_constant)
     return gen_rtx_CONST (mode, x);
   else
-    return x;
+    {
+      if (zero_extend_mode != VOIDmode)
+    x = gen_rtx_ZERO_EXTEND (zero_extend_mode, x);
+      return x;
+    }
 }
 ^L
 /* If X is a sum, return a new sum like X but lacking any constant terms.
diff --git a/gcc/recog.c b/gcc/recog.c
index ee68e30..d3dd591 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -1934,15 +1934,21 @@ int
 offsettable_address_addr_space_p (int strictp, enum machine_mode mode, rtx y,
                   addr_space_t as)
 {
-  enum rtx_code ycode = GET_CODE (y);
+  enum rtx_code ycode;
   rtx z;
-  rtx y1 = y;
+  rtx y1;
   rtx *y2;
   int (*addressp) (enum machine_mode, rtx, addr_space_t) =
     (strictp ? strict_memory_address_addr_space_p
          : memory_address_addr_space_p);
   unsigned int mode_sz = GET_MODE_SIZE (mode);

+  if (GET_CODE (y) == ZERO_EXTEND)
+    y = XEXP (y, 0);
+
+  ycode = GET_CODE (y);
+  y1 = y;
+
   if (CONSTANT_ADDRESS_P (y))
     return 1;


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

* [Bug rtl-optimization/55247] [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90)
  2012-11-09  2:34 [Bug rtl-optimization/55247] New: [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90) hjl.tools at gmail dot com
                   ` (6 preceding siblings ...)
  2012-11-10  2:30 ` hjl.tools at gmail dot com
@ 2012-11-10  9:15 ` ubizjak at gmail dot com
  2012-11-10  9:22 ` ubizjak at gmail dot com
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ubizjak at gmail dot com @ 2012-11-10  9:15 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #7 from Uros Bizjak <ubizjak at gmail dot com> 2012-11-10 09:15:32 UTC ---
(In reply to comment #2)
> (define_insn "*movti_internal_rex64"
>   [(set (match_operand:TI 0 "nonimmediate_operand" "=!r ,!o  ,x,x ,m")
>         (match_operand:TI 1 "general_operand"      "riFo,riF,C,xm,x"))]
>   "TARGET_64BIT && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
> 
> Uros, is this change ok for you?  If it is ok I can commit the patch only on
> Wednesday (I'll be away for a few days).

Yes, the change looks correct to me. I'll take care of the patch.


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

* [Bug rtl-optimization/55247] [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90)
  2012-11-09  2:34 [Bug rtl-optimization/55247] New: [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90) hjl.tools at gmail dot com
                   ` (7 preceding siblings ...)
  2012-11-10  9:15 ` ubizjak at gmail dot com
@ 2012-11-10  9:22 ` ubizjak at gmail dot com
  2012-11-10 11:28 ` uros at gcc dot gnu.org
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ubizjak at gmail dot com @ 2012-11-10  9:22 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #8 from Uros Bizjak <ubizjak at gmail dot com> 2012-11-10 09:22:03 UTC ---
(In reply to comment #3)
> There are 2 issues here:
> 
> 1. Should we use
> 
>     movdqu    (%eax), %xmm0    # 19    *movti_internal_rex64/4    [length = 5]
>     movdqa    %xmm0, (%rsp)    # 29    *movti_internal_rex64/5    [length = 5]
>
> to copy 16 bytes?

Yes, and this is the intention of all these "!" marks.

> 2. Should we split *movti_internal_rex64 if -mno-sse is used?

Movti is used for TARGET_64BIT only. Please keep in mind that *_doubleword
instructions operate on TImode values, so we rely completely on register
allocator to NOT allocate XMM register moves in this case. According to the
documentation, "!" means that alternative is OK if no reloading is needed, so
this fits our purpose to use SSE moves unless we move value directly to TImode
arithmetic operation (*_doubleword patterns).


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

* [Bug rtl-optimization/55247] [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90)
  2012-11-09  2:34 [Bug rtl-optimization/55247] New: [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90) hjl.tools at gmail dot com
                   ` (8 preceding siblings ...)
  2012-11-10  9:22 ` ubizjak at gmail dot com
@ 2012-11-10 11:28 ` uros at gcc dot gnu.org
  2012-11-10 11:47 ` [Bug middle-end/55247] " ubizjak at gmail dot com
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: uros at gcc dot gnu.org @ 2012-11-10 11:28 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #9 from uros at gcc dot gnu.org 2012-11-10 11:28:17 UTC ---
Author: uros
Date: Sat Nov 10 11:28:12 2012
New Revision: 193388

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193388
Log:
    PR target/55247
    * config/i386/i386.md (*movti_internal_rex64): Add "!" to riF->o
    alternative.

testsuite/ChangeLog:

    PR target/55247
    * gcc.target/i386/pr55247.c: New test.


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


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

* [Bug middle-end/55247] [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90)
  2012-11-09  2:34 [Bug rtl-optimization/55247] New: [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90) hjl.tools at gmail dot com
                   ` (9 preceding siblings ...)
  2012-11-10 11:28 ` uros at gcc dot gnu.org
@ 2012-11-10 11:47 ` ubizjak at gmail dot com
  2012-11-10 11:56 ` ubizjak at gmail dot com
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ubizjak at gmail dot com @ 2012-11-10 11:47 UTC (permalink / raw)
  To: gcc-bugs


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

Uros Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-11-10
          Component|rtl-optimization            |middle-end
     Ever Confirmed|0                           |1

--- Comment #10 from Uros Bizjak <ubizjak at gmail dot com> 2012-11-10 11:47:05 UTC ---
Recategorizing due to middle-end issue, see comment #5 and #6.


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

* [Bug middle-end/55247] [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90)
  2012-11-09  2:34 [Bug rtl-optimization/55247] New: [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90) hjl.tools at gmail dot com
                   ` (10 preceding siblings ...)
  2012-11-10 11:47 ` [Bug middle-end/55247] " ubizjak at gmail dot com
@ 2012-11-10 11:56 ` ubizjak at gmail dot com
  2012-11-10 19:02 ` [Bug rtl-optimization/55247] " hjl.tools at gmail dot com
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ubizjak at gmail dot com @ 2012-11-10 11:56 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #11 from Uros Bizjak <ubizjak at gmail dot com> 2012-11-10 11:55:55 UTC ---
~/gcc-build/gcc/cc1 -O2 -mx32 -maddress-mode=long pr55247.c

results in following sequence:

        movdqu  (%eax), %xmm0
        movdqa  %xmm0, (%rsp)
        movq    (%rsp), %rax
        movq    8(%rsp), %rdx
        movq    %rax, 16(%rsp)
        movq    %rdx, 24(%rsp)

while -maddress=mode=short produces expected code:

        movq    8(%eax), %rdx
        movq    (%eax), %rax
        movq    %rdx, 8(%esp)
        movq    %rax, (%esp)


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

* [Bug rtl-optimization/55247] [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90)
  2012-11-09  2:34 [Bug rtl-optimization/55247] New: [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90) hjl.tools at gmail dot com
                   ` (11 preceding siblings ...)
  2012-11-10 11:56 ` ubizjak at gmail dot com
@ 2012-11-10 19:02 ` hjl.tools at gmail dot com
  2012-11-10 19:11 ` hjl.tools at gmail dot com
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: hjl.tools at gmail dot com @ 2012-11-10 19:02 UTC (permalink / raw)
  To: gcc-bugs


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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |UNCONFIRMED
          Component|middle-end                  |rtl-optimization
         Depends on|                            |55259
     Ever Confirmed|1                           |0

--- Comment #12 from H.J. Lu <hjl.tools at gmail dot com> 2012-11-10 19:02:04 UTC ---
(In reply to comment #11)
> ~/gcc-build/gcc/cc1 -O2 -mx32 -maddress-mode=long pr55247.c
> 
> results in following sequence:
> 
>         movdqu  (%eax), %xmm0
>         movdqa  %xmm0, (%rsp)
>         movq    (%rsp), %rax
>         movq    8(%rsp), %rdx
>         movq    %rax, 16(%rsp)
>         movq    %rdx, 24(%rsp)
> 
> while -maddress=mode=short produces expected code:
> 
>         movq    8(%eax), %rdx
>         movq    (%eax), %rax
>         movq    %rdx, 8(%esp)
>         movq    %rax, (%esp)

This is related to PR 55259.  This patch:

http://gcc.gnu.org/ml/gcc-patches/2012-11/msg00799.html

fixes it.


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

* [Bug rtl-optimization/55247] [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90)
  2012-11-09  2:34 [Bug rtl-optimization/55247] New: [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90) hjl.tools at gmail dot com
                   ` (12 preceding siblings ...)
  2012-11-10 19:02 ` [Bug rtl-optimization/55247] " hjl.tools at gmail dot com
@ 2012-11-10 19:11 ` hjl.tools at gmail dot com
  2012-11-10 19:41 ` ubizjak at gmail dot com
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: hjl.tools at gmail dot com @ 2012-11-10 19:11 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #13 from H.J. Lu <hjl.tools at gmail dot com> 2012-11-10 19:11:03 UTC ---
(In reply to comment #12)
> (In reply to comment #11)
> > ~/gcc-build/gcc/cc1 -O2 -mx32 -maddress-mode=long pr55247.c
> > 
> > results in following sequence:
> > 
> >         movdqu  (%eax), %xmm0
> >         movdqa  %xmm0, (%rsp)
> >         movq    (%rsp), %rax
> >         movq    8(%rsp), %rdx
> >         movq    %rax, 16(%rsp)
> >         movq    %rdx, 24(%rsp)
> > 
> > while -maddress=mode=short produces expected code:
> > 
> >         movq    8(%eax), %rdx
> >         movq    (%eax), %rax
> >         movq    %rdx, 8(%esp)
> >         movq    %rax, (%esp)
> 
> This is related to PR 55259.  This patch:
> 
> http://gcc.gnu.org/ml/gcc-patches/2012-11/msg00799.html
> 
> fixes it.

With this fix, we don't need to change *movti_internal_rex64
since it generates redundant load/store.


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

* [Bug rtl-optimization/55247] [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90)
  2012-11-09  2:34 [Bug rtl-optimization/55247] New: [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90) hjl.tools at gmail dot com
                   ` (13 preceding siblings ...)
  2012-11-10 19:11 ` hjl.tools at gmail dot com
@ 2012-11-10 19:41 ` ubizjak at gmail dot com
  2012-11-11 21:53 ` ebotcazou at gcc dot gnu.org
  2012-11-11 23:55 ` hjl.tools at gmail dot com
  16 siblings, 0 replies; 18+ messages in thread
From: ubizjak at gmail dot com @ 2012-11-10 19:41 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #14 from Uros Bizjak <ubizjak at gmail dot com> 2012-11-10 19:41:31 UTC ---
(In reply to comment #13)
> With this fix, we don't need to change *movti_internal_rex64
> since it generates redundant load/store.

True, IIRC this was the reason for asymmetry in alternatives. Please revert the
*movti_internal_rex64 change when the middle-end patch goes in.


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

* [Bug rtl-optimization/55247] [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90)
  2012-11-09  2:34 [Bug rtl-optimization/55247] New: [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90) hjl.tools at gmail dot com
                   ` (14 preceding siblings ...)
  2012-11-10 19:41 ` ubizjak at gmail dot com
@ 2012-11-11 21:53 ` ebotcazou at gcc dot gnu.org
  2012-11-11 23:55 ` hjl.tools at gmail dot com
  16 siblings, 0 replies; 18+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-11-11 21:53 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #15 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-11-11 21:52:53 UTC ---
Author: ebotcazou
Date: Sun Nov 11 21:52:49 2012
New Revision: 193415

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193415
Log:
    PR rtl-optimization/55247
    PR middle-end/55259
    * emit-rtl.c (adjust_address_1): If POINTERS_EXTEND_UNSIGNED > 0,
    handle ZERO_EXTEND.
    * recog.c (offsettable_address_addr_space_p): Likewise.

Added:
    trunk/gcc/testsuite/gcc.target/i386/pr55247-2.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/emit-rtl.c
    trunk/gcc/recog.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug rtl-optimization/55247] [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90)
  2012-11-09  2:34 [Bug rtl-optimization/55247] New: [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90) hjl.tools at gmail dot com
                   ` (15 preceding siblings ...)
  2012-11-11 21:53 ` ebotcazou at gcc dot gnu.org
@ 2012-11-11 23:55 ` hjl.tools at gmail dot com
  16 siblings, 0 replies; 18+ messages in thread
From: hjl.tools at gmail dot com @ 2012-11-11 23:55 UTC (permalink / raw)
  To: gcc-bugs


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

H.J. Lu <hjl.tools at gmail dot com> changed:

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

--- Comment #16 from H.J. Lu <hjl.tools at gmail dot com> 2012-11-11 23:55:38 UTC ---
Fixed.


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

end of thread, other threads:[~2012-11-11 23:55 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-09  2:34 [Bug rtl-optimization/55247] New: [4.8 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90) hjl.tools at gmail dot com
2012-11-09  2:34 ` [Bug rtl-optimization/55247] " hjl.tools at gmail dot com
2012-11-09  5:09 ` hjl.tools at gmail dot com
2012-11-09 19:42 ` vmakarov at redhat dot com
2012-11-10  1:32 ` hjl.tools at gmail dot com
2012-11-10  1:39 ` hjl.tools at gmail dot com
2012-11-10  1:58 ` hjl.tools at gmail dot com
2012-11-10  2:30 ` hjl.tools at gmail dot com
2012-11-10  9:15 ` ubizjak at gmail dot com
2012-11-10  9:22 ` ubizjak at gmail dot com
2012-11-10 11:28 ` uros at gcc dot gnu.org
2012-11-10 11:47 ` [Bug middle-end/55247] " ubizjak at gmail dot com
2012-11-10 11:56 ` ubizjak at gmail dot com
2012-11-10 19:02 ` [Bug rtl-optimization/55247] " hjl.tools at gmail dot com
2012-11-10 19:11 ` hjl.tools at gmail dot com
2012-11-10 19:41 ` ubizjak at gmail dot com
2012-11-11 21:53 ` ebotcazou at gcc dot gnu.org
2012-11-11 23:55 ` hjl.tools at gmail dot com

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