From 14f2df344a8b68da0bd31e6a8201ae293b55d499 Mon Sep 17 00:00:00 2001 From: Segher Boessenkool Date: Tue, 2 Dec 2014 00:48:26 +0100 Subject: [PATCH] re PR rtl-optimization/59278 (combine does not replace matched insn) PR rtl-optimization/59278 combine (reg_dead_at_p): Consider REG_UNUSED notes. From-SVN: r218250 --- gcc/ChangeLog | 5 +++++ gcc/combine.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c42c2e44055..c27b1dbc330 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-12-01 Segher Boessenkool + + PR rtl-optimization/59278 + combine (reg_dead_at_p): Consider REG_UNUSED notes. + 2014-12-01 Segher Boessenkool * combine.c (try_combine): Use is_parallel_of_n_reg_sets some more. diff --git a/gcc/combine.c b/gcc/combine.c index f471920b23e..63c1e4f3f60 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -12990,6 +12990,9 @@ reg_dead_at_p (rtx reg, rtx_insn *insn) { if (INSN_P (insn)) { + if (find_regno_note (insn, REG_UNUSED, reg_dead_regno)) + return 1; + note_stores (PATTERN (insn), reg_dead_at_p_1, NULL); if (reg_dead_flag) return reg_dead_flag == 1 ? 1 : 0; -- 2.30.2