From: Richard Kenner Date: Fri, 1 Jul 1994 23:25:58 +0000 (-0400) Subject: (jump_optimize): Don't convert if (foo) x++ into an add of an scc X-Git-Tag: misc/cutover-egcs-0~6305 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8743ede9fbe9b575a953459f21852dd3cf85bbc0;p=thirdparty%2Fgcc.git (jump_optimize): Don't convert if (foo) x++ into an add of an scc unless X has no side effects and can't trap. From-SVN: r7638 --- diff --git a/gcc/jump.c b/gcc/jump.c index 2f9621f47f52..4cc90bb57c51 100644 --- a/gcc/jump.c +++ b/gcc/jump.c @@ -1248,6 +1248,8 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) && (XEXP (SET_SRC (temp1), 1) == const1_rtx || XEXP (SET_SRC (temp1), 1) == constm1_rtx) && rtx_equal_p (temp2, XEXP (SET_SRC (temp1), 0)) + && ! side_effects_p (temp2) + && ! may_trap_p (temp2) /* INSN must either branch to the insn after TEMP or the insn after TEMP must branch to the same place as INSN. */ && (reallabelprev == temp