From: Jakub Jelinek Date: Mon, 18 Sep 2017 09:31:14 +0000 (+0200) Subject: re PR middle-end/82145 (i386/pr38988.c, i386/pr46254.c, i386/pr55154.c, i386/pr81766... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f1e3a534a0f331c40cf76318812e915e1482b45c;p=gcc.git re PR middle-end/82145 (i386/pr38988.c, i386/pr46254.c, i386/pr55154.c, i386/pr81766.c fails) PR target/82145 * config/i386/i386.c (ix86_init_large_pic_reg): Revert 2017-09-01 changes. Turn CODE_LABEL into NOTE_INSN_DELETED_LABEL immediately. (ix86_init_pic_reg): Revert 2017-09-01 changes. From-SVN: r252915 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 17b0d7c71f9..efedc341b9d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-09-18 Jakub Jelinek + + PR target/82145 + * config/i386/i386.c (ix86_init_large_pic_reg): Revert 2017-09-01 + changes. Turn CODE_LABEL into NOTE_INSN_DELETED_LABEL immediately. + (ix86_init_pic_reg): Revert 2017-09-01 changes. + 2017-09-18 Eric Botcazou PR target/81361 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 1ed6f75d455..7103d119374 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -8888,7 +8888,7 @@ ix86_use_pseudo_pic_reg (void) /* Initialize large model PIC register. */ -static rtx_code_label * +static void ix86_init_large_pic_reg (unsigned int tmp_regno) { rtx_code_label *label; @@ -8905,7 +8905,10 @@ ix86_init_large_pic_reg (unsigned int tmp_regno) emit_insn (gen_set_got_offset_rex64 (tmp_reg, label)); emit_insn (ix86_gen_add3 (pic_offset_table_rtx, pic_offset_table_rtx, tmp_reg)); - return label; + const char *name = LABEL_NAME (label); + PUT_CODE (label, NOTE); + NOTE_KIND (label) = NOTE_INSN_DELETED_LABEL; + NOTE_DELETED_LABEL_NAME (label) = name; } /* Create and initialize PIC register if required. */ @@ -8914,7 +8917,6 @@ ix86_init_pic_reg (void) { edge entry_edge; rtx_insn *seq; - rtx_code_label *label = NULL; if (!ix86_use_pseudo_pic_reg ()) return; @@ -8924,7 +8926,7 @@ ix86_init_pic_reg (void) if (TARGET_64BIT) { if (ix86_cmodel == CM_LARGE_PIC) - label = ix86_init_large_pic_reg (R11_REG); + ix86_init_large_pic_reg (R11_REG); else emit_insn (gen_set_got_rex64 (pic_offset_table_rtx)); } @@ -8948,22 +8950,6 @@ ix86_init_pic_reg (void) entry_edge = single_succ_edge (ENTRY_BLOCK_PTR_FOR_FN (cfun)); insert_insn_on_edge (seq, entry_edge); commit_one_edge_insertion (entry_edge); - - if (label) - { - basic_block bb = BLOCK_FOR_INSN (label); - rtx_insn *bb_note = PREV_INSN (label); - /* If the note preceding the label starts a basic block, and the - label is a member of the same basic block, interchange the two. */ - if (bb_note != NULL_RTX - && NOTE_INSN_BASIC_BLOCK_P (bb_note) - && bb != NULL - && bb == BLOCK_FOR_INSN (bb_note)) - { - reorder_insns_nobb (bb_note, bb_note, label); - BB_HEAD (bb) = label; - } - } } /* Initialize a variable CUM of type CUMULATIVE_ARGS