This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix up maybe_cleanup_end_of_block (PR middle-end/46629)


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.

--- 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)));

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]