diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-10-16 07:08:27 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-10-16 07:08:27 +0000 |
commit | 0c68a6e480b6c41bd5913e4a87894df3bf9ae0ef (patch) | |
tree | 11ca77ca6bc811b3f8eff3dc3e8be39a71fabd57 /gcc/gcse.c | |
parent | 69365e54df4e8748a0412a5526495669fea631a4 (diff) | |
download | gcc-0c68a6e480b6c41bd5913e4a87894df3bf9ae0ef.tar.gz |
* gcse.c (hash_expr_1): Add in MEM_ALIAS_SET.
(expr_equiv_p): Reject memories with different alias sets.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30039 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r-- | gcc/gcse.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/gcse.c b/gcc/gcse.c index d660a493dc1..f43f3823c42 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -1446,6 +1446,7 @@ hash_expr_1 (x, mode, do_not_record_p) return 0; } hash += (unsigned) MEM; + hash += MEM_ALIAS_SET (x); x = XEXP (x, 0); goto repeat; @@ -1578,6 +1579,14 @@ expr_equiv_p (x, y) case REG: return REGNO (x) == REGNO (y); + case MEM: + /* Can't merge two expressions in different alias sets, since we can + decide that the expression is transparent in a block when it isn't, + due to it being set with the different alias set. */ + if (MEM_ALIAS_SET (x) != MEM_ALIAS_SET (y)) + return 0; + break; + /* For commutative operations, check both orders. */ case PLUS: case MULT: |