[Bug rtl-optimization/52714] [4.7/4.8/4.9 regression] ICE in fixup_reorder_chain, at cfglayout.c:880

schwab@linux-m68k.org gcc-bugzilla@gcc.gnu.org
Sun Dec 29 15:56:00 GMT 2013


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

--- Comment #11 from Andreas Schwab <schwab@linux-m68k.org> ---
try_combine is called with

i1 = (insn 14 13 16 2 (set (reg/v/f:SI 34 [ stack ])
        (reg/f:SI 15 %sp)) pr52714.c:9 38 {*movsi_m68k2}
     (nil))
i2 = (insn 16 14 17 2 (set (cc0)
        (compare (reg/v/f:SI 34 [ stack ])
            (const_int 0 [0]))) pr52714.c:10 4 {*tstsi_internal_68020_cf}
     (nil))
i3 = (jump_insn 17 16 18 2 (set (pc)
        (if_then_else (eq (cc0)
                (const_int 0 [0]))
            (label_ref 40)
            (pc))) pr52714.c:10 390 {beq}
     (int_list:REG_BR_PROB 1014 (nil))
 -> 40)

This is then combined into
newpat = (parallel [
        (set (pc)
            (pc))
        (set (reg/v/f:SI 34 [ stack ])
            (reg/f:SI 15 %sp))
    ])

This isn't a recognized insn, and it needs to be split.  In the 4.5
version the condition "use_crosses_set_p (SET_SRC (XVECEXP (newpat, 0,
1)), DF_INSN_LUID (i2))" (which returns 1 due to PUSH_ROUNDING) prevents
this from being done, so the whole try fails.

In the post-4.5 version the condition is used to select which of the parts to
put first.  The result are the two insn
(insn 16 14 17 2 (set (pc)
        (pc)) pr52714.c:10 2147483647 {NOOP_MOVE}
     (nil))
(jump_insn 17 16 18 2 (set (reg/v/f:SI 34 [ stack ])
        (reg/f:SI 15 %sp)) pr52714.c:10 38 {*movsi_m68k2}
     (int_list:REG_BR_PROB 1014 (nil))
 -> 40)

This is obviously bogus, since the latter is no longer a valid jump_insn.



More information about the Gcc-bugs mailing list