re PR rtl-optimization/59278 (combine does not replace matched insn)
authorSegher Boessenkool <segher@kernel.crashing.org>
Mon, 1 Dec 2014 23:48:26 +0000 (00:48 +0100)
committerSegher Boessenkool <segher@gcc.gnu.org>
Mon, 1 Dec 2014 23:48:26 +0000 (00:48 +0100)
PR rtl-optimization/59278
combine (reg_dead_at_p): Consider REG_UNUSED notes.

From-SVN: r218250

gcc/ChangeLog
gcc/combine.c

index c42c2e4405555fb1e1687b79c2a1717f0aaf0716..c27b1dbc330fb4c92cf5ed1b2518bf74a1f63b6b 100644 (file)
@@ -1,3 +1,8 @@
+2014-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
+
+       PR rtl-optimization/59278
+       combine (reg_dead_at_p): Consider REG_UNUSED notes.
+
 2014-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
 
        * combine.c (try_combine): Use is_parallel_of_n_reg_sets some more.
index f471920b23eae9c44111f4a6fc7e8ae22d5570d6..63c1e4f3f6031d5fd0885d3f4274707307348649 100644 (file)
@@ -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;