diff options
author | Richard Henderson <rth@cygnus.com> | 1999-10-16 00:08:27 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 1999-10-16 00:08:27 -0700 |
commit | 297c3335895f3eba396572abb4e760633511f1a4 (patch) | |
tree | 11ca77ca6bc811b3f8eff3dc3e8be39a71fabd57 /gcc/gcse.c | |
parent | 9329983a8f6d7085d84e8bc8cbe1e759534845da (diff) | |
download | gcc-297c3335895f3eba396572abb4e760633511f1a4.zip gcc-297c3335895f3eba396572abb4e760633511f1a4.tar.gz gcc-297c3335895f3eba396572abb4e760633511f1a4.tar.bz2 |
gcse.c (hash_expr_1): Add in MEM_ALIAS_SET.
* gcse.c (hash_expr_1): Add in MEM_ALIAS_SET.
(expr_equiv_p): Reject memories with different alias sets.
From-SVN: r30039
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r-- | gcc/gcse.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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: |