On 05/20/14 01:11, Zhenqiang Chen wrote:
Hi,

The patch fix ICE issue triggered by shrink-wrapping enhancement.

Bootstrap and no make check regression on X86-64.

OK for trunk?

Thanks!
-Zhenqiang


2014-05-20  Zhenqiang Chen  <zhenqiang.c...@linaro.org>

         PR rtl-optimization/61220
         Part of PR rtl-optimization/61225
         * shrink-wrap.c (move_insn_for_shrink_wrap): Skip SP and FP adjustment
         insn; skip split_edge for a block without only on successor.

testsuite/ChangeLog:
2014-05-20  Zhenqiang Chen  <zhenqiang.c...@linaro.org>

         * gcc.dg/pr61220.c: New test.
         * gcc.dg/shrink-wrap-loop.c: Disable for x86_64 -m32 mode.

[ ... ]



    /* Make sure that the source register isn't defined later in BB.  */
@@ -204,6 +209,10 @@ move_insn_for_shrink_wrap (basic_block bb, rtx insn,
    /* Create a new basic block on the edge.  */
    if (EDGE_COUNT (next_block->preds) == 2)
      {
+      /* split_edge for a block with only one successor is meaningless.  */
+      if (EDGE_COUNT (bb->succs) == 1)
+       return false;
+
        next_block = split_edge (live_edge);
So don't you just want to use:

if (EDGE_CRITICAL_P (live_edge))

to replace the two explicit checks of EDGE_COUNT on the preds & succs?

jeff

Reply via email to