This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] for PR 14229
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Cc: danglin at gcc dot gnu dot org
- Date: Sat, 21 Feb 2004 00:26:48 +0100
- Subject: [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);