Commit 8743ede9 by Richard Kenner

(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
parent a78bdb8e
...@@ -1248,6 +1248,8 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) ...@@ -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) == const1_rtx
|| XEXP (SET_SRC (temp1), 1) == constm1_rtx) || XEXP (SET_SRC (temp1), 1) == constm1_rtx)
&& rtx_equal_p (temp2, XEXP (SET_SRC (temp1), 0)) && 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 /* INSN must either branch to the insn after TEMP or the insn
after TEMP must branch to the same place as INSN. */ after TEMP must branch to the same place as INSN. */
&& (reallabelprev == temp && (reallabelprev == temp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment