As shown in the PR, ifcvt will happily make invalid insns when given the
chance. This patch teaches it some manners.
PR rtl-optimization/78751
* ifcvt.c (find_cond_trap): If we generated a non-existing insn,
give up.
From-SVN: r244476
+2017-01-15 Segher Boessenkool <segher@kernel.crashing.org>
+
+ PR rtl-optimization/78751
+ * ifcvt.c (find_cond_trap): If we generated a non-existing insn,
+ give up.
+
2017-01-14 Jeff Law <law@redhat.com>
PR tree-optimization/79090
if (seq == NULL)
return FALSE;
+ /* If that results in an invalid insn, back out. */
+ for (rtx_insn *x = seq; x; x = NEXT_INSN (x))
+ if (recog_memoized (x) < 0)
+ return FALSE;
+
/* Emit the new insns before cond_earliest. */
emit_insn_before_setloc (seq, cond_earliest, INSN_LOCATION (trap));