+2015-12-10 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/68691
+ * lra-spills.c (lra_final_code_change): Check pseudo occurrence
+ number in non-debug insns and remove debug insns if necessary.
+
2015-12-10 Martin Sebor <msebor@redhat.com>
* invoke.texi (Warning Options): Update -Wall options. Clarify
}
lra_insn_recog_data_t id = lra_get_insn_recog_data (insn);
+ struct lra_insn_reg *reg;
+
+ for (reg = id->regs; reg != NULL; reg = reg->next)
+ if (reg->regno >= FIRST_PSEUDO_REGISTER
+ && lra_reg_info [reg->regno].nrefs == 0)
+ break;
+
+ if (reg != NULL)
+ {
+ /* Pseudos still can be in debug insns in some very rare
+ and complicated cases, e.g. the pseudo was removed by
+ inheritance and the debug insn is not EBBs where the
+ inheritance happened. It is difficult and time
+ consuming to find what hard register corresponds the
+ pseudo -- so just remove the debug insn. Another
+ solution could be assigning hard reg/memory but it
+ would be a misleading info. It is better not to have
+ info than have it wrong. */
+ lra_assert (DEBUG_INSN_P (insn));
+ lra_invalidate_insn_data (insn);
+ delete_insn (insn);
+ continue;
+ }
+
struct lra_static_insn_data *static_id = id->insn_static_data;
bool insn_change_p = false;
+2015-12-10 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/68691
+ * gcc.target/i386/pr68691.c: New.
+
2015-12-10 David Malcolm <dmalcolm@redhat.com>
* lib/multiline.exp (_multiline_expected_outputs): Update comment.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O3 -g" } */
+
+char a, b, i, j;
+int c, d, e, f, g, h, n;
+
+char
+fn1 ()
+{
+ char k, l, m;
+ int p;
+ e = g > f;
+ for (b = 0; b < 2; b++)
+ {
+ for (p = 0; p < 3; p++)
+ {
+ for (; h < 1; h++)
+ {
+ for (; m;)
+ goto lbl;
+ e = g;
+ }
+ l = a < 0 || a < d;
+ }
+ d++;
+ for (;;)
+ {
+ k = g;
+ n = -k;
+ j = n;
+ c = j;
+ e = 2;
+ if (l)
+ break;
+ return 2;
+ }
+ }
+ for (;;)
+ ;
+ lbl:
+ return i;
+}