diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-10-14 20:50:40 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-10-14 20:50:40 +0000 |
commit | bc311e72ef2c8d2b941ed8c131666ec68c00e14d (patch) | |
tree | 1a00d9684ead61aa00dcd814be10ad013fbfd710 | |
parent | 4a664681fbae55ce5bad34c98c2db0d585364bd2 (diff) | |
download | gcc-bc311e72ef2c8d2b941ed8c131666ec68c00e14d.tar.gz |
8
* combine.c (combine_instructions): When finished, call init_recog.
* regmove.c (optimize_reg_copy_3): Reject volatile MEMs.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23094 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/combine.c | 3 | ||||
-rw-r--r-- | gcc/regmove.c | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 619c897f811..f355abc0600 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -674,6 +674,9 @@ combine_instructions (f, nregs) total_successes += combine_successes; nonzero_sign_valid = 0; + + /* Make recognizer allow volatile MEMs again. */ + init_recog (); } /* Wipe the reg_last_xxx arrays in preparation for another pass. */ diff --git a/gcc/regmove.c b/gcc/regmove.c index 35ddf12d6f3..55dd3f352c3 100644 --- a/gcc/regmove.c +++ b/gcc/regmove.c @@ -553,6 +553,11 @@ optimize_reg_copy_3 (insn, dest, src) || SET_DEST (set) != src_reg) return; + /* Be conserative: although this optimization is also valid for + volatile memory references, that could cause trouble in later passes. */ + if (MEM_VOLATILE_P (SET_SRC (set))) + return; + /* Do not use a SUBREG to truncate from one mode to another if truncation is not a nop. */ if (GET_MODE_BITSIZE (GET_MODE (src_reg)) <= GET_MODE_BITSIZE (GET_MODE (src)) |