From: Segher Boessenkool Date: Mon, 1 Dec 2014 23:48:26 +0000 (+0100) Subject: re PR rtl-optimization/59278 (combine does not replace matched insn) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=14f2df344a8b68da0bd31e6a8201ae293b55d499;p=gcc.git 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 --- 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;