public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/43653]  New: ICE: in reload, at reload1.c:1188 with -O2 -ftree-vectorize and empty struct
@ 2010-04-05 20:10 zsojka at seznam dot cz
  2010-04-05 20:12 ` [Bug rtl-optimization/43653] " zsojka at seznam dot cz
  2010-04-11 20:36 ` [Bug rtl-optimization/43653] ICE: in reload, at reload1.c:1188 with -O1 " ubizjak at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: zsojka at seznam dot cz @ 2010-04-05 20:10 UTC (permalink / raw)
  To: gcc-bugs

Command line:
gcc -O2 -ftree-vectorize testcase.c

Tested versions:
r157965 - crash
alpha20100401 - crash (disabled checking)
4.4.3, 4.3.4 - crash (gentoo, disabled checking)
4.2.4, 4.1.2 - OK (gentoo, disabled checking)

Compiler output - with checking:
$ gcc -O2 -ftree-vectorize testcase.c
testcase.c: In function 'foo':
testcase.c:10:1: internal compiler error: in reload, at reload1.c:1188

Without checking:
$ gcc-4.5.0-alpha20100401 -O2 -ftree-vectorize testcase.c
testcase.c: In function 'foo':
testcase.c:10:1: error: unrecognizable insn:
(insn 38 37 8 2 testcase.c:4 (set (reg:DI 22 xmm1)
        (plus:DI (reg:DI 22 xmm1)
            (mem/u/c/i:DI (symbol_ref/u:DI ("*.LC0") [flags 0x2]) [4 S8 A64])))
-1 (expr_list:REG_EQUIV (plus:DI (reg/f:DI 7 sp)
            (mem/u/c/i:DI (symbol_ref/u:DI ("*.LC0") [flags 0x2]) [4 S8 A64]))
        (nil)))
testcase.c:10:1: internal compiler error: in extract_insn, at recog.c:2103


-- 
           Summary: ICE: in reload, at reload1.c:1188 with -O2 -ftree-
                    vectorize and empty struct
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zsojka at seznam dot cz
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


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


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

* [Bug rtl-optimization/43653] ICE: in reload, at reload1.c:1188 with -O2 -ftree-vectorize and empty struct
  2010-04-05 20:10 [Bug rtl-optimization/43653] New: ICE: in reload, at reload1.c:1188 with -O2 -ftree-vectorize and empty struct zsojka at seznam dot cz
@ 2010-04-05 20:12 ` zsojka at seznam dot cz
  2010-04-11 20:36 ` [Bug rtl-optimization/43653] ICE: in reload, at reload1.c:1188 with -O1 " ubizjak at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: zsojka at seznam dot cz @ 2010-04-05 20:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from zsojka at seznam dot cz  2010-04-05 20:11 -------
Created an attachment (id=20315)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20315&action=view)
reduced testcase

-O1 is enough for this testcase:

$ gcc -O1 -ftree-vectorize pr43653.c
pr43653.c: In function 'foo':
pr43653.c:10:1: internal compiler error: in reload, at reload1.c:1188


-- 


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


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

* [Bug rtl-optimization/43653] ICE: in reload, at reload1.c:1188 with -O1 -ftree-vectorize and empty struct
  2010-04-05 20:10 [Bug rtl-optimization/43653] New: ICE: in reload, at reload1.c:1188 with -O2 -ftree-vectorize and empty struct zsojka at seznam dot cz
  2010-04-05 20:12 ` [Bug rtl-optimization/43653] " zsojka at seznam dot cz
@ 2010-04-11 20:36 ` ubizjak at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: ubizjak at gmail dot com @ 2010-04-11 20:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from ubizjak at gmail dot com  2010-04-11 20:35 -------
Works with -fno-omit-frame-pointer.  We expand to:

(insn 8 7 0 pr43653.c:4 (set (reg:V2DI 61 [ vect_cst_.2 ])
        (vec_duplicate:V2DI (reg/f:DI 54 virtual-stack-vars))) 1700
{*vec_dupv2d
i} (nil))

(insn 9 8 0 pr43653.c:4 (parallel [
            (set (reg:DI 64 [ ivtmp.9 ])
                (plus:DI (reg/f:DI 54 virtual-stack-vars)
                    (const_int -512 [0xfffffffffffffe00])))
            (clobber (reg:CC 17 flags))
        ]) -1 (nil))

In -fomit-frame-pointer case, RA is trying to eliminate frame reg and at the
same time trying to satisfy "x" register constraint, RA chokes on either of:

(insn 8 5 9 2 pr43653.c:4 (set (reg:V2DI 61 [ vect_cst_.2 ])
        (vec_duplicate:V2DI (reg/f:DI 20 frame))) 1700 {*vec_dupv2di} (nil))

(insn 9 8 10 2 pr43653.c:4 (parallel [
            (set (reg:DI 64 [ ivtmp.9 ])
                (plus:DI (reg/f:DI 20 frame)
                    (const_int -512 [0xfffffffffffffe00])))
            (clobber (reg:CC 17 flags))
        ]) 252 {*adddi_1} (expr_list:REG_UNUSED (reg:CC 17 flags)
        (nil)))

The failure in (insn 8) can be triggered on non-TARGET_INTER_UNIT_MOVES targets
(i.e. -march=k8) when temp stack slot is generated to move from (eliminated?)
integer %rbp to SSE %xmm reg via stack slot.

The failure in (insn 9) can be triggered with -march=core2 also when frame
pointer is to be eliminated.

Using -mno-omit-frame-pointer, we get:

(insn 32 5 33 2 pr43653.c:4 (set (mem/c:DI (plus:DI (reg/f:DI 6 bp)
                (const_int -520 [0xfffffffffffffdf8])) [0 S8 A64])
        (reg/f:DI 6 bp)) 89 {*movdi_1_rex64} (nil))

(insn 33 32 8 2 pr43653.c:4 (set (reg:DI 22 xmm1)
        (mem/c:DI (plus:DI (reg/f:DI 6 bp)
                (const_int -520 [0xfffffffffffffdf8])) [0 S8 A64])) 89
{*movdi_1
_rex64} (nil))

(insn 8 33 34 2 pr43653.c:4 (set (reg:V2DI 22 xmm1)
        (vec_duplicate:V2DI (reg:DI 22 xmm1))) 1700 {*vec_dupv2di}
(expr_list:RE
G_EQUIV (vec_duplicate:V2DI (reg/f:DI 6 bp))
        (nil)))

(insn 34 8 9 2 pr43653.c:4 (set (reg:V2DI 21 xmm0 [orig:61 vect_cst_.2 ] [61])
        (reg:V2DI 22 xmm1)) 1049 {*movv2di_internal} (nil))

(insn 9 34 10 2 pr43653.c:4 (parallel [
            (set (reg:DI 0 ax [orig:64 ivtmp.9 ] [64])
                (plus:DI (reg/f:DI 6 bp)
                    (const_int -512 [0xfffffffffffffe00])))
            (clobber (reg:CC 17 flags))
        ]) 252 {*adddi_1} (expr_list:REG_EQUAL (plus:DI (reg/f:DI 6 bp)
            (const_int -512 [0xfffffffffffffe00]))
        (nil)))

Adding CC.


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vmakarov at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-04-11 20:35:55
               date|                            |


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


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

end of thread, other threads:[~2010-04-11 20:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-05 20:10 [Bug rtl-optimization/43653] New: ICE: in reload, at reload1.c:1188 with -O2 -ftree-vectorize and empty struct zsojka at seznam dot cz
2010-04-05 20:12 ` [Bug rtl-optimization/43653] " zsojka at seznam dot cz
2010-04-11 20:36 ` [Bug rtl-optimization/43653] ICE: in reload, at reload1.c:1188 with -O1 " ubizjak 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).