From cd8998a31a6d93f850510f2392831e871670c069 Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Wed, 8 Dec 1999 17:49:26 +0000 Subject: [PATCH] Don't hoist volatile mems out of loops. From-SVN: r30834 --- gcc/ChangeLog | 4 ++++ gcc/loop.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b66687dc452..f0da4a9ad13 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +1999-12-08 Bernd Schmidt + + * loop.c (insert_loop_mem): Don't hoist volatile mems out of loops. + 1999-12-08 Jakub Jelinek * config/sparc/sparc.c (ultra_cmove_results_ready_p, diff --git a/gcc/loop.c b/gcc/loop.c index 90e6c44f5ea..96f5e66b65e 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; -- 2.30.2