ifcvt: Don't make invalid insns for a cond trap (PR78751)
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
This commit is contained in:
parent
0cb4b758f5
commit
32a8d3f66a
2 changed files with 11 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
|
|
|
@ -4686,6 +4686,11 @@ find_cond_trap (basic_block test_bb, edge then_edge, edge else_edge)
|
|||
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));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue