summaryrefslogtreecommitdiff
path: root/gcc/jump.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/jump.c')
-rw-r--r--gcc/jump.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/jump.c b/gcc/jump.c
index 8915410dcd6..a120300fc09 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -1716,7 +1716,9 @@ invert_jump_1 (rtx jump, rtx nlabel)
if (num_validated_changes () == ochanges)
return 0;
- return redirect_jump_1 (jump, nlabel);
+ /* redirect_jump_1 will fail of nlabel == olabel, and the current use is
+ in Pmode, so checking this is not merely an optimization. */
+ return nlabel == JUMP_LABEL (jump) || redirect_jump_1 (jump, nlabel);
}
/* Invert the condition of the jump JUMP, and make it jump to label