+2009-09-20 Paolo Bonzini <bonzini@gnu.org>
+
+ PR/39886
+ * combine.c (update_cfg_for_uncondjump): Set EDGE_FALLTHRU
+ just when insn is equal to BB_END (bb).
+
2009-09-19 Adam Nemet <anemet@caviumnetworks.com>
* config/mips/mips.opt (mrelax-pic-calls): New option.
}
}
-/* Delete the conditional jump INSN and adjust the CFG correspondingly.
+/* Delete the unconditional jump INSN and adjust the CFG correspondingly.
Note that the INSN should be deleted *after* removing dead edges, so
that the kept edge is the fallthrough edge for a (set (pc) (pc))
but not for a (set (pc) (label_ref FOO)). */
update_cfg_for_uncondjump (rtx insn)
{
basic_block bb = BLOCK_FOR_INSN (insn);
+ bool at_end = (BB_END (bb) == insn);
- if (BB_END (bb) == insn)
+ if (at_end)
purge_dead_edges (bb);
delete_insn (insn);
- if (EDGE_COUNT (bb->succs) == 1)
+ if (at_end && EDGE_COUNT (bb->succs) == 1)
single_succ_edge (bb)->flags |= EDGE_FALLTHRU;
}
--- /dev/null
+/* PR middle-end/39886 */
+
+int foo (int);
+
+volatile unsigned char g;
+
+void bar (int p)
+{
+ char l = 0xE1;
+ func ((foo ((p & g) <= l), 1));
+}
+