aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcse.c
diff options
context:
space:
mode:
authorZdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>2003-09-06 19:05:02 +0200
committerZdenek Dvorak <rakdver@gcc.gnu.org>2003-09-06 17:05:02 +0000
commitbad998e07ea294d3b712b99bce845139c21ecc7c (patch)
treea6ad10b6cf328517181ef962e2f5fee9f25f9bb6 /gcc/gcse.c
parent34ff26738c101dfa4a8dd25aecd3719f4481824a (diff)
downloadgcc-bad998e07ea294d3b712b99bce845139c21ecc7c.zip
gcc-bad998e07ea294d3b712b99bce845139c21ecc7c.tar.gz
gcc-bad998e07ea294d3b712b99bce845139c21ecc7c.tar.bz2
gcse.c (expr_equiv_p): Don't consider anything to be equal to volatile mem.
* gcse.c (expr_equiv_p): Don't consider anything to be equal to volatile mem. From-SVN: r71140
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r--gcc/gcse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/gcse.c b/gcc/gcse.c
index 9779663..edc8a62 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -1787,6 +1787,10 @@ expr_equiv_p (rtx x, rtx y)
due to it being set with the different alias set. */
if (MEM_ALIAS_SET (x) != MEM_ALIAS_SET (y))
return 0;
+
+ /* A volatile mem should not be considered equivalent to any other. */
+ if (MEM_VOLATILE_P (x) || MEM_VOLATILE_P (y))
+ return 0;
break;
/* For commutative operations, check both orders. */