Don't put things between tablejumps and jump tables in loop.c

From-SVN: r29887
This commit is contained in:
Bernd Schmidt 1999-10-10 11:37:46 +00:00 committed by Bernd Schmidt
parent 85c45372dc
commit 17bec8eee7
2 changed files with 20 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Sun Oct 10 13:28:48 1999 Bernd Schmidt <bernds@cygnus.co.uk>
* loop.c (find_and_verify_loops): When looking for a BARRIER, don't
use one before a jump table.
Sun Oct 10 02:41:41 1999 Richard Henderson <rth@cygnus.com>
* genrecog.c (add_to_sequence): Move allow_const_int test outside

View File

@ -2841,16 +2841,30 @@ find_and_verify_loops (f)
rtx target
= JUMP_LABEL (insn) ? JUMP_LABEL (insn) : get_last_insn ();
int target_loop_num = uid_loop_num[INSN_UID (target)];
rtx loc;
rtx loc, loc2;
for (loc = target; loc; loc = PREV_INSN (loc))
if (GET_CODE (loc) == BARRIER
/* Don't move things inside a tablejump. */
&& ((loc2 = next_nonnote_insn (loc)) == 0
|| GET_CODE (loc2) != CODE_LABEL
|| (loc2 = next_nonnote_insn (loc2)) == 0
|| GET_CODE (loc2) != JUMP_INSN
|| (GET_CODE (PATTERN (loc2)) != ADDR_VEC
&& GET_CODE (PATTERN (loc2)) != ADDR_DIFF_VEC))
&& uid_loop_num[INSN_UID (loc)] == target_loop_num)
break;
if (loc == 0)
for (loc = target; loc; loc = NEXT_INSN (loc))
if (GET_CODE (loc) == BARRIER
/* Don't move things inside a tablejump. */
&& ((loc2 = next_nonnote_insn (loc)) == 0
|| GET_CODE (loc2) != CODE_LABEL
|| (loc2 = next_nonnote_insn (loc2)) == 0
|| GET_CODE (loc2) != JUMP_INSN
|| (GET_CODE (PATTERN (loc2)) != ADDR_VEC
&& GET_CODE (PATTERN (loc2)) != ADDR_DIFF_VEC))
&& uid_loop_num[INSN_UID (loc)] == target_loop_num)
break;