summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-08 15:22:25 +0000
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-08 15:22:25 +0000
commit50f46d50f3ff1254e0e3abf59b3277e881a2f6bd (patch)
treec97d69e6375a2325a5e373b86c53bb8d5ebf4ee5
parentf7f07c955cb07ec8c84640117467542fc07a2591 (diff)
downloadgcc-50f46d50f3ff1254e0e3abf59b3277e881a2f6bd.tar.gz
* jump.c (invert_jump_1): Don't call redirect_jump_1 with
nlabel == JUMP_LABEL (jump). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96105 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/jump.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 40d702cde82..9d30cd32467 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2005-03-08 J"orn Rennecke <joern.rennecke@st.com>
+
+ * jump.c (invert_jump_1): Don't call redirect_jump_1 with
+ nlabel == JUMP_LABEL (jump).
+
2005-03-08 Kazu Hirata <kazu@cs.umass.edu>
* c-common.c, c-opts.c, combine.c, cse.c, dojump.c,
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