[Bug bootstrap/79069] [7 Regression] Bootstrap failure on s390x-linux while building libgo

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jan 12 11:43:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79069

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The ICE is during the jump2 pass, there is EDGE_FALLTHRU in between
(note 21 1 942 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
(insn 942 21 943 2 (unspec_volatile [
            (code_label 0 0 0 10311 (nil) [2 uses])
            (code_label 946 944 960 3 10310 (nil) [2 uses])
            (const_int 71344 [0x116b0])
            (const_int 0 [0])
        ] UNSPECV_SPLIT_STACK_DATA) "../../../../libgo/go/runtime/trace.go":731
-1
     (insn_list:REG_LABEL_OPERAND 0 (insn_list:REG_LABEL_OPERAND 946 (nil))))
(insn 943 942 944 2 (set (reg:SI 1 %r1)
        (label_ref 0)) "../../../../libgo/go/runtime/trace.go":731 -1
     (insn_list:REG_LABEL_OPERAND 0 (nil)))
(jump_insn 944 943 946 2 (parallel [
            (set (pc)
                (label_ref 946))
            (set (reg:SI 1 %r1)
                (unspec_volatile [
                        (symbol_ref:SI ("__morestack") [flags 0x3])
                        (reg:SI 1 %r1)
                    ] UNSPECV_SPLIT_STACK_CALL))
        ]) "../../../../libgo/go/runtime/trace.go":731 -1
     (expr_list:REG_UNUSED (reg:SI 1 %r1)
        (nil))
 -> 946)

basic block and

(code_label 946 944 960 3 10310 (nil) [2 uses])
(note 960 946 947 3 [bb 3] NOTE_INSN_BASIC_BLOCK)
(insn/f 947 960 948 3 (parallel [
            (set/f (mem:SI (plus:SI (reg/f:SI 15 %r15)
                        (const_int 24 [0x18])) [332  S4 A8])
                (reg:SI 6 %r6))
            (set/f (mem:SI (plus:SI (reg/f:SI 15 %r15)
                        (const_int 28 [0x1c])) [332  S4 A8])
                (reg:SI 7 %r7))
            (set/f (mem:SI (plus:SI (reg/f:SI 15 %r15)
                        (const_int 32 [0x20])) [332  S4 A8])
                (reg:SI 8 %r8))
            (set/f (mem:SI (plus:SI (reg/f:SI 15 %r15)
                        (const_int 36 [0x24])) [332  S4 A8])
                (reg:SI 9 %r9))
            (set/f (mem:SI (plus:SI (reg/f:SI 15 %r15)
                        (const_int 40 [0x28])) [332  S4 A8])
                (reg:SI 10 %r10))
            (set/f (mem:SI (plus:SI (reg/f:SI 15 %r15)
                        (const_int 44 [0x2c])) [332  S4 A8])
                (reg:SI 11 %r11))
            (set/f (mem:SI (plus:SI (reg/f:SI 15 %r15)
                        (const_int 48 [0x30])) [332  S4 A8])
                (reg:SI 12 %r12))
            (set/f (mem:SI (plus:SI (reg/f:SI 15 %r15)
                        (const_int 52 [0x34])) [332  S4 A8])
                (reg:SI 13 %r13))
            (set/f (mem:SI (plus:SI (reg/f:SI 15 %r15)
                        (const_int 56 [0x38])) [332  S4 A8])
                (reg:SI 14 %r14))
            (set/f (mem:SI (plus:SI (reg/f:SI 15 %r15)
                        (const_int 60 [0x3c])) [332  S4 A8])
                (reg/f:SI 15 %r15))
        ]) "../../../../libgo/go/runtime/trace.go":731 -1
     (expr_list:REG_DEAD (reg:SI 14 %r14)
        (expr_list:REG_DEAD (reg:SI 13 %r13)
            (expr_list:REG_DEAD (reg:SI 12 %r12)
                (expr_list:REG_DEAD (reg:SI 10 %r10)
                    (expr_list:REG_DEAD (reg:SI 9 %r9)
                        (expr_list:REG_DEAD (reg:SI 8 %r8)
                            (expr_list:REG_DEAD (reg:SI 7 %r7)
                                (expr_list:REG_DEAD (reg:SI 6 %r6)
                                    (nil))))))))))
(insn 948 947 949 3 (set (reg:SI 13 %r13)
        (unspec_volatile [
                (const_int 0 [0])
            ] UNSPECV_MAIN_POOL)) "../../../../libgo/go/runtime/trace.go":731
-1
     (nil))
(insn/f 949 948 950 3 (parallel [
            (set (reg/f:SI 15 %r15)
                (plus:SI (reg/f:SI 15 %r15)
                    (mem/u/c:SI (unspec:SI [
                                (symbol_ref/u:SI ("*.LC1035") [flags 0x2])
                                (reg:SI 13 %r13)
                            ] UNSPEC_LTREF) [10  S4 A32])))
            (clobber (reg:CC 33 %cc))
        ]) "../../../../libgo/go/runtime/trace.go":731 -1
     (expr_list:REG_DEAD (reg:SI 13 %r13)
        (expr_list:REG_UNUSED (reg:CC 33 %cc)
            (expr_list:REG_FRAME_RELATED_EXPR (set (reg/f:SI 15 %r15)
                    (plus:SI (reg/f:SI 15 %r15)
                        (const_int -71344 [0xfffffffffffee950])))
                (nil)))))
(insn 950 949 951 3 (set (reg:SI 12 %r12)
        (symbol_ref:SI ("_GLOBAL_OFFSET_TABLE_") [flags 0x2]))
"../../../../libgo/go/runtime/trace.go":731 -1
     (nil))
(note 951 950 941 3 NOTE_INSN_PROLOGUE_END)
(insn 941 951 3 3 (set (reg:SI 13 %r13)
        (unspec_volatile [
                (const_int 0 [0])
            ] UNSPECV_MAIN_POOL)) -1
     (nil))
(note 3 941 26 3 NOTE_INSN_FUNCTION_BEG)
(note 26 3 2 3 NOTE_INSN_DELETED)
(insn 2 26 27 3 (set (mem/c:SI (plus:SI (reg/f:SI 15 %r15)
                (const_int 220 [0xdc])) [331 %sfp+-71124 S4 A32])
        (reg:SI 2 %r2 [ tab ])) "../../../../libgo/go/runtime/trace.go":731
1100 {*movsi_esa}
     (expr_list:REG_DEAD (reg:SI 2 %r2 [ tab ])
        (nil)))
(insn 27 2 727 3 (set (reg/f:SI 1 %r1 [121])
        (plus:SI (reg/f:SI 15 %r15)
            (const_int 668 [0x29c])))
"../../../../libgo/go/runtime/trace.go":732 1101 {*la_31}
     (expr_list:REG_EQUAL (plus:SI (reg/f:SI 34 %fp)
            (const_int -70676 [0xfffffffffffeebec]))
        (nil)))
(insn 727 27 34 3 (set (reg:SI 2 %r2 [218])
        (const_int 20 [0x14])) "../../../../libgo/go/runtime/trace.go":732 1100
{*movsi_esa}
     (expr_list:REG_EQUAL (const_int 20 [0x14])
        (nil)))

basic block, supposedly because the basic blocks are adjacent.  The JUMP_INSN
satisfies the any_uncondjump_p predicate and the RTL verification requires that
unconditional jumps don't have fallthru edges.  So either we need to reconsider
how the unconditional morestack call is represented in the IL (say a CALL_INSN
instead?  But then we wouldn't have a label), or fix the cfgrtl.c etc. to be
able to cope with such jumps that it can't optimize away, even if they
unconditionally jump to the very next insn.  To some extent this is related to
PR72749, there we have a conditional jump that can't be optimized away (due to
UNSPEC too), that degenerates (both conditions want to branch to the same bb
right after the conditional jump) and then we are unable to split such edges
properly.  I bet that is latently a problem with the s390x conditional
morestack pattern, that is also a conditional jump with side-effects that is
degenerate even from the beginning (pro_and_epilogue that introduces it), as it
falls through to the same bb as it conditionally jumps to.


More information about the Gcc-bugs mailing list