diff mbox

Fix up maybe_cleanup_end_of_block (PR middle-end/46629)

Message ID 20101124085934.GB29412@tyan-ft48-01.lab.bos.redhat.com
State New
Headers show

Commit Message

Jakub Jelinek Nov. 24, 2010, 8:59 a.m. UTC
On Tue, Nov 23, 2010 at 04:51:35PM -0800, H.J. Lu wrote:
Committed as obvious, will deal with the testcase later.

2010-11-24  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/46629
	* cfgexpand.c (maybe_cleanup_end_of_block): Test NEXT_INSN (insn)
	instead of insn with any_condjump_p.


	Jakub
diff mbox

Patch

--- gcc/cfgexpand.c.jj	2010-11-23 16:14:44.000000000 +0100
+++ gcc/cfgexpand.c	2010-11-24 02:03:52.225261091 +0100
@@ -1695,7 +1695,7 @@  maybe_cleanup_end_of_block (edge e, rtx 
 	  insn = PREV_INSN (insn);
 	  if (JUMP_P (NEXT_INSN (insn)))
 	    {
-	      if (!any_condjump_p (insn))
+	      if (!any_condjump_p (NEXT_INSN (insn)))
 		{
 		  gcc_assert (BARRIER_P (NEXT_INSN (NEXT_INSN (insn))));
 		  delete_insn (NEXT_INSN (NEXT_INSN (insn)));