aboutsummaryrefslogtreecommitdiff
path: root/flow.c
diff options
context:
space:
mode:
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
parentDuh! Remove a very very incorrect left-over flow simplification call. (diff)
downloadsparse-ac0a6eccafcb0a84cd0f1079e2fbb8b3d688b9af.tar.gz
sparse-ac0a6eccafcb0a84cd0f1079e2fbb8b3d688b9af.tar.bz2
sparse-ac0a6eccafcb0a84cd0f1079e2fbb8b3d688b9af.zip
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 2eb282c..fdd9eb9 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:
/*