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 rtl-opt/24626


The problem here is that the change which Mostafa did to
rtl_verify_flow_info_1 did not make sense. It changed the check
to make sure that if we have a jump instruction and don't have an edge
which is a non fallthrough. This is true when we have a jump instruction
which is also have some code associated with it (like a delay slot of
a branch instruction which hppa has).
The correct check is to make sure that the jump label is the first
instruction of the fallthrough edge as that would mean the jump instruction
has only has one edge and the jump instruction goes to the same BB no matter
what happens to the if the jump is taken or not.


This reverts part of Mostafa which causes us to ICE when the jump instructions
goes to the same BB no matter if the jump is taken or not.


OK? Bootstrapped and tested on x86_64-linux-gnu and tested (by David) on hppa-hpux
(or hppa-linux I don't know fully).


Thanks,
Andrew Pinski

ChangeLog:

	* cfgrtl.c (rtl_verify_flow_info_1): Fix the case where the jump
	instructions goes to only one BB.


Index: cfgrtl.c
===================================================================
--- cfgrtl.c (revision 108350)
+++ cfgrtl.c (working copy)
@@ -2046,7 +2046,7 @@
err = 1;
}
if (n_branch != 1 && any_condjump_p (BB_END (bb))
- && JUMP_LABEL (BB_END (bb)) == BB_HEAD (fallthru->dest))
+ && JUMP_LABEL (BB_END (bb)) != BB_HEAD (fallthru->dest))
{
error ("wrong amount of branch edges after conditional jump %i", bb->index);
err = 1;



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