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] for PR 14229


Hello,

this patch should fix the problem, by preventing us from trying
to eliminate the jumps with side effects in try_simplify_condjump.

Zdenek

	PR optimization/14229
	* cfgcleanup.c (try_simplify_condjump): Do not try to clean up
	jump with side effects.

Index: cfgcleanup.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfgcleanup.c,v
retrieving revision 1.106
diff -c -3 -p -r1.106 cfgcleanup.c
*** cfgcleanup.c	2 Feb 2004 00:17:08 -0000	1.106
--- cfgcleanup.c	20 Feb 2004 23:21:13 -0000
*************** try_simplify_condjump (basic_block cbran
*** 132,138 ****
    /* Verify that we've got a normal conditional branch at the end
       of the block.  */
    cbranch_insn = BB_END (cbranch_block);
!   if (!any_condjump_p (cbranch_insn))
      return false;
  
    cbranch_fallthru_edge = FALLTHRU_EDGE (cbranch_block);
--- 132,139 ----
    /* Verify that we've got a normal conditional branch at the end
       of the block.  */
    cbranch_insn = BB_END (cbranch_block);
!   if (!any_condjump_p (cbranch_insn)
!       || !onlyjump_p (cbranch_insn))
      return false;
  
    cbranch_fallthru_edge = FALLTHRU_EDGE (cbranch_block);


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