mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-17 05:10:28 +08:00
Don't put things between tablejumps and jump tables in loop.c
From-SVN: r29887
This commit is contained in:
parent
85c45372dc
commit
17bec8eee7
@ -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
|
||||
|
16
gcc/loop.c
16
gcc/loop.c
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user