summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordrow <drow@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-15 14:33:04 +0000
committerdrow <drow@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-15 14:33:04 +0000
commitb123b3ab5f5fd894834ea08877c2c7a89392d553 (patch)
tree7c37a694ad475aca692ae54a5897d1e3d4de5632
parent2f31b77d88303bfa2995f350e5108fe58ae24fc7 (diff)
downloadppe42-gcc-b123b3ab5f5fd894834ea08877c2c7a89392d553.tar.gz
ppe42-gcc-b123b3ab5f5fd894834ea08877c2c7a89392d553.zip
* loop.c (scan_loop): Do not insert temporaries for hard registers.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107019 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/loop.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f2b22fa98a2..3b723f917eb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
2005-11-15 Daniel Jacobowitz <dan@codesourcery.com>
+ * loop.c (scan_loop): Do not insert temporaries for hard registers.
+
+2005-11-15 Daniel Jacobowitz <dan@codesourcery.com>
+
* config/arm/lib1funcs.asm (div0) [L_dvmd_lnx]: Call raise instead
of making syscalls.
* config/arm/linux-eabi.h (CLEAR_INSN_CACHE): Define. Set r7 also.
diff --git a/gcc/loop.c b/gcc/loop.c
index 6df63026ab8..9efc84eff93 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -1238,13 +1238,15 @@ scan_loop (struct loop *loop, int flags)
- 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). */
+ - if the source is a legitimate constant (likewise),
+ - if the dest is a hard register (may be unrecognizable). */
else if (insert_temp
&& (optimize_size
|| ! can_copy_p (GET_MODE (SET_SRC (set)))
|| REG_P (SET_SRC (set))
|| (CONSTANT_P (SET_SRC (set))
- && LEGITIMATE_CONSTANT_P (SET_SRC (set)))))
+ && LEGITIMATE_CONSTANT_P (SET_SRC (set)))
+ || REGNO (SET_DEST (set)) < FIRST_PSEUDO_REGISTER))
;
else if ((tem = loop_invariant_p (loop, src))
&& (dependencies == 0
OpenPOWER on IntegriCloud