aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/flow.c
diff options
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-11-30 23:51:54 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:05:21 -0700
commitac0a6eccafcb0a84cd0f1079e2fbb8b3d688b9af (patch)
tree262901ba348c487f4febc40777281e35c2b79c6d /flow.c
parent95a62d3603ee4e1906d427b6ac639ab4c3a3a089 (diff)
downloadsparse-dev-ac0a6eccafcb0a84cd0f1079e2fbb8b3d688b9af.tar.gz
Fix thinko. If we follow a conditional branch, we should _not_
also try to rewrite the target, since we're now not even going to reach that instruction. More importantly, rewriting the first conditional branch will have removed the parent to the second one, so then checking for "single parent" will _not_ mean that we were it. Quite the reverse.
Diffstat (limited to 'flow.c')
-rw-r--r--flow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/flow.c b/flow.c
index 2eb282cf..fdd9eb98 100644
--- a/flow.c
+++ b/flow.c
@@ -182,7 +182,7 @@ static int simplify_branch_branch(struct basic_block *bb, struct instruction *br
goto try_to_rewrite_target;
if (bb_depends_on(final, target))
goto try_to_rewrite_target;
- retval = rewrite_branch(bb, target_p, target, final);
+ return rewrite_branch(bb, target_p, target, final);
try_to_rewrite_target:
/*