This obvious patch extends my 2011-08-03 fix to simple_return.
Necessary for the same reason as the original patch, namely that
rs6000.md has a peephole2 that matches and recreates a conditional
jump. With the third patch in this series applied, rs6000 will start
to use simple_return in conditional jumps. Even though I think this
patch meets the "obvious" requirement, I won't apply it without the
other two since the assert may trigger on mips without the second
patch in this series.
PR rtl-optimization/49941
* jump.c (mark_jump_label_1): Set JUMP_LABEL for simple_return jumps.
diff -urp -x.svn -x'*~' -x'*.orig' gcc-bernd/gcc/jump.c gcc-current/gcc/jump.c
--- gcc-bernd/gcc/jump.c 2011-09-16 11:52:14.000000000 +0930
+++ gcc-current/gcc/jump.c 2011-09-16 09:59:39.000000000 +0930
@@ -1086,6 +1086,7 @@ mark_jump_label_1 (rtx x, rtx insn, bool
return;
case RETURN:
+ case SIMPLE_RETURN:
if (is_target)
{
gcc_assert (JUMP_LABEL (insn) == NULL || JUMP_LABEL (insn) == x);
@@ -1408,7 +1409,7 @@ redirect_exp_1 (rtx *loc, rtx olabel, rt
int i;
const char *fmt;
- if ((code == LABEL_REF && XEXP (x, 0) == olabel)
+ if ((code == LABEL_REF && XEXP (x, 0) == olabel)
|| x == olabel)
{
x = redirect_target (nlabel);
--
Alan Modra
Australia Development Lab, IBM