diff options
author | Eric Botcazou <ebotcazou@libertysurf.fr> | 2003-04-03 21:20:06 +0200 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2003-04-03 19:20:06 +0000 |
commit | 773eae3968d667a04e0fadf85c2536ad2a313618 (patch) | |
tree | da21670875e2f4f834c72f607c39c9fb2b81cb38 /gcc/loop.c | |
parent | 613fa1469c1a9b5a8f27fe76a5731e154535c71e (diff) | |
download | gcc-773eae3968d667a04e0fadf85c2536ad2a313618.zip gcc-773eae3968d667a04e0fadf85c2536ad2a313618.tar.gz gcc-773eae3968d667a04e0fadf85c2536ad2a313618.tar.bz2 |
re PR rtl-optimization/10157 ([Sparc] internal compiler error: in extract_insn, at recog.c:2188)
PR optimization/10157
* gcse.c (can_copy_p): Rename it to can_copy.
(can_copy_init_p): Remove.
(compute_can_copy): Use can_copy instead of can_copy_p.
(can_copy_p): New exported function. Call compute_can_copy.
(hash_scan_set): Use it.
(gcse_main): Don't call compute_can_copy.
(bypass_jumps): Don't call compute_can_copy.
* rtl.h (can_copy_p): Declare.
* loop.c (scan_loop): Don't move the source and add a reg-to-reg
copy if the mode doesn't support copy operations.
From-SVN: r65210
Diffstat (limited to 'gcc/loop.c')
-rw-r--r-- | gcc/loop.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -824,7 +824,7 @@ scan_loop (loop, flags) && (maybe_never || loop_reg_used_before_p (loop, set, p))) /* It is unsafe to move the set. However, it may be OK to - move the source into a new psuedo, and subsitute a + move the source into a new pseudo, and substitute a reg-to-reg copy for the original insn. This code used to consider it OK to move a set of a variable @@ -839,11 +839,15 @@ scan_loop (loop, flags) the benefit. */ 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) or if the source is - already a reg (the motion will gain nothing). */ + /* Don't move the source and add a reg-to-reg copy: + - with -Os (this certainly increases size), + - if the mode doesn't support copy operations (obviously), + - if the source is already a reg (the motion will gain nothing), + - if the source is a legitimate constant (likewise). */ else if (insert_temp - && (optimize_size || GET_CODE (SET_SRC (set)) == REG + && (optimize_size + || ! can_copy_p (GET_MODE (SET_SRC (set))) + || GET_CODE (SET_SRC (set)) == REG || (CONSTANT_P (SET_SRC (set)) && LEGITIMATE_CONSTANT_P (SET_SRC (set))))) ; |