[PATCH] Update JUMP_LABEL in combiner
Zdenek Dvorak
rakdver@atrey.karlin.mff.cuni.cz
Tue Jul 22 18:17:00 GMT 2003
Hello,
I encountered the following problem during my work on rtlopt-branch
(i.e. I don't have a mainline testcase, and I don't know whether it is
not handled somewhere): In combiner, tablejump is simplified to
simplejump. The created simplejump does not have JUMP_LABEL set,
and therefore purge_all_dead_edges removes all the edges from the block,
leading to an incorrect cfg.
Zdenek
* combine.c (try_combine): Set JUMP_LABEL for newly created
unconditional jump.
Index: combine.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/combine.c,v
retrieving revision 1.310.2.14
diff -c -3 -p -r1.310.2.14 combine.c
*** combine.c 18 Mar 2003 20:56:55 -0000 1.310.2.14
--- combine.c 22 Jul 2003 18:03:50 -0000
*************** try_combine (i3, i2, i1, new_direct_jump
*** 2840,2845 ****
--- 2840,2846 ----
if (returnjump_p (i3) || any_uncondjump_p (i3))
{
*new_direct_jump_p = 1;
+ mark_jump_label (PATTERN (i3), i3, 0);
if ((temp = next_nonnote_insn (i3)) == NULL_RTX
|| GET_CODE (temp) != BARRIER)
More information about the Gcc-patches
mailing list