aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2017-09-18 11:31:14 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2017-09-18 11:31:14 +0200
commitf1e3a534a0f331c40cf76318812e915e1482b45c (patch)
tree6e53f6abdecf68203d4659d516962481cfe9cb58 /gcc
parent0eeb9f3d7cb92d0e32fb7e206ba61ec74268c386 (diff)
downloadgcc-f1e3a534a0f331c40cf76318812e915e1482b45c.zip
gcc-f1e3a534a0f331c40cf76318812e915e1482b45c.tar.gz
gcc-f1e3a534a0f331c40cf76318812e915e1482b45c.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/i386/i386.c26
2 files changed, 13 insertions, 20 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 17b0d7c..efedc34 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2017-09-18 Jakub Jelinek <jakub@redhat.com>
+
+ 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 <ebotcazou@adacore.com>
PR target/81361
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 1ed6f75..7103d11 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