diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1994-05-20 09:59:51 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1994-05-20 09:59:51 -0700 |
commit | d902c7ead337606903a3744440b7a684854ba2cb (patch) | |
tree | 7ac16619953c1c3a8f64d5d4bd59afe13eaac3ce /gcc | |
parent | f6709c70a8a8bd93173cbc9ff001e257e8d41a08 (diff) | |
download | gcc-d902c7ead337606903a3744440b7a684854ba2cb.zip gcc-d902c7ead337606903a3744440b7a684854ba2cb.tar.gz gcc-d902c7ead337606903a3744440b7a684854ba2cb.tar.bz2 |
(expand_exit_loop_if_false): Emit conditional jump around
unconditional loop exit instead of conditional loop exit.
From-SVN: r7346
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/stmt.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -2267,7 +2267,17 @@ expand_exit_loop_if_false (whichloop, cond) NULL_TREE); } else - do_jump (cond, whichloop->data.loop.end_label, NULL_RTX); + { + /* In order to handle fixups, we actually create a conditional jump + around a unconditional branch to exit the loop. If fixups are + necessary, they go before the unconditional branch. */ + + rtx label = gen_label_rtx (); + do_jump (cond, NULL_RTX, label); + expand_goto_internal (NULL_TREE, whichloop->data.loop.end_label, + NULL_RTX); + emit_label (label); + } return 1; } |