From: Jim Wilson Date: Mon, 11 Mar 1996 18:12:30 +0000 (-0800) Subject: (jump_optimize): When handle a USE insn before an unconditional jump... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9740123d5c5e2fd32c7413dd9bdbdabdbb6b07b2;p=gcc.git (jump_optimize): When handle a USE insn before an unconditional jump... (jump_optimize): When handle a USE insn before an unconditional jump, disable the optimization if the USE is the only insn in the loop. From-SVN: r11512 --- diff --git a/gcc/jump.c b/gcc/jump.c index f668a472bc8..2b9218a7763 100644 --- a/gcc/jump.c +++ b/gcc/jump.c @@ -682,7 +682,15 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) && (temp1 = prev_nonnote_insn (JUMP_LABEL (insn))) != 0 && (GET_CODE (temp1) == BARRIER || (GET_CODE (temp1) == INSN - && rtx_equal_p (PATTERN (temp), PATTERN (temp1))))) + && rtx_equal_p (PATTERN (temp), PATTERN (temp1)))) + /* Don't do this optimization if we have a loop containing only + the USE instruction, and the loop start label has a usage + count of 1. This is because we will redo this optimization + everytime through the outer loop, and jump opt will never + exit. */ + && ! ((temp2 = prev_nonnote_insn (temp)) != 0 + && temp2 == JUMP_LABEL (insn) + && LABEL_NUSES (temp2) == 1)) { if (GET_CODE (temp1) == BARRIER) {