aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop.c
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>2003-04-25 00:58:28 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2003-04-25 00:58:28 +0000
commit9feff11466f71874cad0446eb5b08eec82a3bdc0 (patch)
treed187c59aebf3efeb9af07a85e938b7f451cd074a /gcc/loop.c
parent13e7174292985ffa15d192d59da140b70e0d8a5f (diff)
downloadgcc-9feff11466f71874cad0446eb5b08eec82a3bdc0.zip
gcc-9feff11466f71874cad0446eb5b08eec82a3bdc0.tar.gz
gcc-9feff11466f71874cad0446eb5b08eec82a3bdc0.tar.bz2
re PR rtl-optimization/8705 ([HP-PA] ICE in emit_move_insn_1, at expr.c:3101)
PR opt/8705 * gcse.c (try_replace_reg): On a successful substitution of a constant into a single set, try to simplify the source of the set. * loop.c (scan_loop): Don't try to optimize a MODE_CC set with a constant source. From-SVN: r66060
Diffstat (limited to 'gcc/loop.c')
-rw-r--r--gcc/loop.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index d7ae3ea..1bdc1bd 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -833,11 +833,17 @@ scan_loop (loop, flags)
That behavior is incorrect and was removed. */
insert_temp = 1;
+ /* Don't try to optimize a MODE_CC set with a constant
+ source. It probably will be combined with a conditional
+ jump. */
+ if (GET_MODE_CLASS (GET_MODE (SET_DEST (set))) == MODE_CC
+ && CONSTANT_P (src))
+ ;
/* Don't try to optimize a register that was made
by loop-optimization for an inner loop.
We don't know its life-span, so we can't compute
the benefit. */
- if (REGNO (SET_DEST (set)) >= max_reg_before_loop)
+ else if (REGNO (SET_DEST (set)) >= max_reg_before_loop)
;
/* Don't move the source and add a reg-to-reg copy:
- with -Os (this certainly increases size),