diff options
| author | crux <crux@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-10-10 11:37:46 +0000 |
|---|---|---|
| committer | crux <crux@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-10-10 11:37:46 +0000 |
| commit | 1d322be1e6284df0212bc83be388c59261b320a0 (patch) | |
| tree | b6ae3d6d89263adbe56709a7d54a3d75bb769731 | |
| parent | f276a75f997090ec649bb0dbbcd50bd82cc4b483 (diff) | |
| download | ppe42-gcc-1d322be1e6284df0212bc83be388c59261b320a0.tar.gz ppe42-gcc-1d322be1e6284df0212bc83be388c59261b320a0.zip | |
Don't put things between tablejumps and jump tables in loop.c
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29887 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/loop.c | 16 |
2 files changed, 20 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fe3500eac28..ab9aef9dee9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/loop.c b/gcc/loop.c index 40ed922a783..ea815fff847 100644 --- a/gcc/loop.c +++ b/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; |

