From: Bernd Schmidt Date: Wed, 4 May 2011 20:24:15 +0000 (+0000) Subject: re PR rtl-optimization/47612 (RTL crash when cc0 setter moved away from cc0 user) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0360f70d36156a2a537e985f09fbf675c16bda2a;p=gcc.git re PR rtl-optimization/47612 (RTL crash when cc0 setter moved away from cc0 user) PR rtl-optimization/47612 * df-problems.c (can_move_insns_across): Don't pick a cc0 setter as the last insn of the sequence to be moved. From-SVN: r173393 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 00d84974ca3..4ff3175c079 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-05-04 Bernd Schmidt + + PR rtl-optimization/47612 + * df-problems.c (can_move_insns_across): Don't pick a cc0 setter + as the last insn of the sequence to be moved. + 2011-05-04 Tobias Burnus PR fortran/48864 diff --git a/gcc/df-problems.c b/gcc/df-problems.c index 0f398ba3aa4..e5b88e3d2dc 100644 --- a/gcc/df-problems.c +++ b/gcc/df-problems.c @@ -4001,7 +4001,10 @@ can_move_insns_across (rtx from, rtx to, rtx across_from, rtx across_to, if (bitmap_intersect_p (merge_set, test_use) || bitmap_intersect_p (merge_use, test_set)) break; - max_to = insn; +#ifdef HAVE_cc0 + if (!sets_cc0_p (insn)) +#endif + max_to = insn; } next = NEXT_INSN (insn); if (insn == to) @@ -4038,7 +4041,11 @@ can_move_insns_across (rtx from, rtx to, rtx across_from, rtx across_to, { if (NONDEBUG_INSN_P (insn)) { - if (!bitmap_intersect_p (test_set, local_merge_live)) + if (!bitmap_intersect_p (test_set, local_merge_live) +#ifdef HAVE_cc0 + && !sets_cc0_p (insn) +#endif + ) { max_to = insn; break;