diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-06 09:24:17 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-06 09:24:17 +0000 |
commit | 1bf87870c40d1255cd6693733754ca35b20beae6 (patch) | |
tree | e501dc448ea86d2c8f176dca36dc7d65ec568c2d /gcc | |
parent | 54aeea8e0a9fffba853d2299e9fc64997e20534d (diff) |
PR optimization/12215
* cse.c (cse_set_around_loop): Emit the move at the beginning
of the next basic block for trapping sets.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-3_3-branch@72143 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cse.c | 10 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 |
3 files changed, 19 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7437f6886bf..7fa65a878d0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2003-10-06 Eric Botcazou <ebotcazou@libertysurf.fr> + PR optimization/12215 + * cse.c (cse_set_around_loop): Emit the move at the beginning + of the next basic block for trapping sets. + +2003-10-06 Eric Botcazou <ebotcazou@libertysurf.fr> + PR optimization/11637 * combine.c (adjust_for_new_dest): New function to adjust the notes and LOG_LINKS when the dest of an insn has changed. diff --git a/gcc/cse.c b/gcc/cse.c index 1ace4122123..9566865debe 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -6844,7 +6844,15 @@ cse_set_around_loop (x, insn, loop_start) abort (); } else - emit_insn_after (move, p); + { + if (control_flow_insn_p (p)) + /* p can cause a control flow transfer so it + is the last insn of a basic block. We can't + therefore use emit_insn_after. */ + emit_insn_before (move, next_nonnote_insn (p)); + else + emit_insn_after (move, p); + } } break; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 836b2ba00b3..ac2f565902a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2003-10-06 Wolfgang Bangerth <bangerth@ticam.utexas.edu> + + * g++.dg/opt/cfg2.C: New test. + 2003-10-06 Eric Botcazou <ebotcazou@libertysurf.fr> * g++.dg/opt/float1.C: New test. |