aboutsummaryrefslogtreecommitdiff
path: root/gcc/jump.c
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2008-06-18 19:16:05 +0200
committerUros Bizjak <uros@gcc.gnu.org>2008-06-18 19:16:05 +0200
commitba03a3508bfbf83b6bbd07f47bc1573ab6f6f89f (patch)
tree3695e2f0bf42ec6e5a41d786fe2d3f31db37ba93 /gcc/jump.c
parentfdd7f24186c7cd637e24c657367f270afb3ec431 (diff)
downloadgcc-ba03a3508bfbf83b6bbd07f47bc1573ab6f6f89f.zip
gcc-ba03a3508bfbf83b6bbd07f47bc1573ab6f6f89f.tar.gz
gcc-ba03a3508bfbf83b6bbd07f47bc1573ab6f6f89f.tar.bz2
re PR rtl-optimization/35604 (Label references are not updated after edge insertion)
PR rtl-optimization/35604 * jump.c (redirect_exp_1): Skip the condition of an IF_THEN_ELSE. We only want to change jump destinations, not eventual label comparisons. From-SVN: r136899
Diffstat (limited to 'gcc/jump.c')
-rw-r--r--gcc/jump.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/jump.c b/gcc/jump.c
index 1aa0c6d..23d183e 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -1327,6 +1327,15 @@ redirect_exp_1 (rtx *loc, rtx olabel, rtx nlabel, rtx insn)
return;
}
+ if (code == IF_THEN_ELSE)
+ {
+ /* Skip the condition of an IF_THEN_ELSE. We only want to
+ change jump destinations, not eventual label comparisons. */
+ redirect_exp_1 (&XEXP (x, 1), olabel, nlabel, insn);
+ redirect_exp_1 (&XEXP (x, 2), olabel, nlabel, insn);
+ return;
+ }
+
fmt = GET_RTX_FORMAT (code);
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{