diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-04-06 10:49:13 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-04-06 10:49:13 +0000 |
commit | 726118741a3b5ed2c20f8ec6d37e38e04a02d6e6 (patch) | |
tree | 18eca73ba61813c4a0c66ba3359383e5a9687123 | |
parent | a8c876a411d9ab8b51f704d278b4f897ae94605b (diff) | |
download | gcc-726118741a3b5ed2c20f8ec6d37e38e04a02d6e6.tar.gz |
Mon Apr 6 07:17:52 1998 Catherine Moore <clm@cygnus.com>
* combine.c (can_combine_p): Include successor in volatile test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19018 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/combine.c | 17 |
2 files changed, 15 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ff58273ca53..e74d6f395a1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Mon Apr 6 07:17:52 1998 Catherine Moore <clm@cygnus.com> + + * combine.c (can_combine_p): Include successor in volatile test. + Mon Apr 6 14:16:33 1998 J"orn Rennecke <amylaar@cygnus.co.uk> * sh.h (CASE_VECTOR_SHORTEN_MODE): Fix logic when to set diff --git a/gcc/combine.c b/gcc/combine.c index 8a03a3ded67..c831be1052a 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -1037,14 +1037,19 @@ can_combine_p (insn, i3, pred, succ, pdest, psrc) return 0; /* If INSN contains anything volatile, or is an `asm' (whether volatile - or not), reject, unless nothing volatile comes between it and I3, - with the exception of SUCC. */ + or not), reject, unless nothing volatile comes between it and I3 */ if (GET_CODE (src) == ASM_OPERANDS || volatile_refs_p (src)) - for (p = NEXT_INSN (insn); p != i3; p = NEXT_INSN (p)) - if (GET_RTX_CLASS (GET_CODE (p)) == 'i' - && p != succ && volatile_refs_p (PATTERN (p))) - return 0; + { + /* Make sure succ doesn't contain a volatile reference. */ + if (succ != 0 && volatile_refs_p (PATTERN (succ))) + return 0; + + for (p = NEXT_INSN (insn); p != i3; p = NEXT_INSN (p)) + if (GET_RTX_CLASS (GET_CODE (p)) == 'i' + && p != succ && volatile_refs_p (PATTERN (p))) + return 0; + } /* If INSN is an asm, and DEST is a hard register, reject, since it has to be an explicit register variable, and was chosen for a reason. */ |