diff options
author | John David Anglin <dave.anglin@nrc-cnrc.gc.ca> | 2003-04-25 00:58:28 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2003-04-25 00:58:28 +0000 |
commit | 9feff11466f71874cad0446eb5b08eec82a3bdc0 (patch) | |
tree | d187c59aebf3efeb9af07a85e938b7f451cd074a /gcc/gcse.c | |
parent | 13e7174292985ffa15d192d59da140b70e0d8a5f (diff) | |
download | gcc-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/gcse.c')
-rw-r--r-- | gcc/gcse.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -3963,6 +3963,15 @@ try_replace_reg (from, to, insn) if (num_changes_pending () && apply_change_group ()) success = 1; + /* Try to simplify SET_SRC if we have substituted a constant. */ + if (success && set && CONSTANT_P (to)) + { + src = simplify_rtx (SET_SRC (set)); + + if (src) + validate_change (insn, &SET_SRC (set), src, 0); + } + if (!success && set && reg_mentioned_p (from, SET_SRC (set))) { /* If above failed and this is a single set, try to simplify the source of |