aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@cygnus.co.uk>1999-12-08 17:49:26 +0000
committerBernd Schmidt <crux@gcc.gnu.org>1999-12-08 17:49:26 +0000
commitcd8998a31a6d93f850510f2392831e871670c069 (patch)
tree729f7a2a866db2b2e3466560abb391c1e342d9ea /gcc
parentdd4be5a186c6a6ddac94995f26d9af1c50043da4 (diff)
downloadgcc-cd8998a31a6d93f850510f2392831e871670c069.zip
gcc-cd8998a31a6d93f850510f2392831e871670c069.tar.gz
gcc-cd8998a31a6d93f850510f2392831e871670c069.tar.bz2
Don't hoist volatile mems out of loops.
From-SVN: r30834
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/loop.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b66687d..f0da4a9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+1999-12-08 Bernd Schmidt <bernds@cygnus.co.uk>
+
+ * loop.c (insert_loop_mem): Don't hoist volatile mems out of loops.
+
1999-12-08 Jakub Jelinek <jakub@redhat.com>
* config/sparc/sparc.c (ultra_cmove_results_ready_p,
diff --git a/gcc/loop.c b/gcc/loop.c
index 90e6c44..96f5e66 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -9667,7 +9667,8 @@ insert_loop_mem (mem, data)
because we can't put it in a register. We still store it in the
table, though, so that if we see the same address later, but in a
non-BLK mode, we'll not think we can optimize it at that point. */
- loop_mems[loop_mems_idx].optimize = (GET_MODE (m) != BLKmode);
+ loop_mems[loop_mems_idx].optimize = (GET_MODE (m) != BLKmode
+ && ! MEM_VOLATILE_P (m));
loop_mems[loop_mems_idx].reg = NULL_RTX;
++loop_mems_idx;