------- Comment #14 from rguenth at gcc dot gnu dot org  2010-07-07 09:01 
-------
Huh.  Unrolling preserves MEM_ATTRs even though it re-writes the RTXen.  That
causes scheduling to see just a bunch of repeated

(insn 218 309 219 18 t.c:9 (parallel [
            (set (mem:SI (reg/v/f:DI 1 dx [orig:100 a ] [100]) [2 *a_22+0 S4
A32])
                (ashift:SI (mem:SI (reg/v/f:DI 1 dx [orig:100 a ] [100]) [2
*a_22+0 S4 A32])
                    (const_int 1 [0x1])))
            (clobber (reg:CC 17 flags))
        ]) 490 {*ashlsi3_1} (expr_list:REG_UNUSED (reg:CC 17 flags)
        (expr_list:REG_EQUAL (ashift:SI (mem:SI (plus:DI (reg/v/f:DI 0 ax
[orig:84 a ] [84])
                        (const_int 16 [0x10])) [2 *a_22+0 S4 A32])
                (const_int 1 [0x1]))
            (nil))))

(insn 220 219 221 18 t.c:10 (set (reg:SI 4 si [103])
        (mem:SI (plus:DI (reg/v/f:DI 1 dx [orig:100 a ] [100])
                (const_int -8 [0xfffffffffffffff8])) [2 MEM[(int *)a_22 +
-8B]+0 S4 A32])) 63 {*movsi_internal} (nil))

(insn 221 220 222 18 t.c:10 (parallel [
            (set (reg:SI 4 si [103])
                (plus:SI (reg:SI 4 si [103])
                    (mem:SI (plus:DI (reg/v/f:DI 1 dx [orig:100 a ] [100])
                            (const_int -4 [0xfffffffffffffffc])) [2 MEM[(int
*)a_22 + -4B]+0 S4 A32])))
            (clobber (reg:CC 17 flags))
        ]) 251 {*addsi_1} (expr_list:REG_UNUSED (reg:CC 17 flags)
        (nil)))

(insn 222 221 310 18 t.c:10 (set (mem:SI (plus:DI (reg/v/f:DI 1 dx [orig:100 a
] [100])
                (const_int 4 [0x4])) [2 MEM[(int *)a_22 + 4B]+0 S4 A32])
        (reg:SI 4 si [103])) 63 {*movsi_internal} (expr_list:REG_DEAD (reg:SI 4
si [103])
        (expr_list:REG_DEAD (reg/v/f:DI 1 dx [orig:100 a ] [100])
            (expr_list:REG_EQUAL (plus:SI (mem:SI (plus:DI (reg/v/f:DI 1 dx
[orig:100 a ] [100])
                            (const_int -8 [0xfffffffffffffff8])) [2 MEM[(int
*)a_22 + -8B]+0 S4 A32])
                    (mem:SI (plus:DI (reg/v/f:DI 1 dx [orig:100 a ] [100])
                            (const_int -4 [0xfffffffffffffffc])) [2 MEM[(int
*)a_22 + -4B]+0 S4 A32]))
                (nil)))))

where there is obviously no conflicts between the above patterns during
different unrolled copies.

Who is supposed to magically deal with that?  (or what is supposed to prevent
this from happening?)


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rakdver at gcc dot gnu dot
                   |                            |org
            Summary|[4.6 regression] RTL loop   |[4.6 regression] RTL loop
                   |unrolling and scheduling    |unrolling causes FAIL:
                   |cause FAIL: gcc.dg/pr39794.c|gcc.dg/pr39794.c


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

Reply via email to