From: Zdenek Dvorak Date: Sat, 6 Sep 2003 17:05:02 +0000 (+0200) Subject: gcse.c (expr_equiv_p): Don't consider anything to be equal to volatile mem. X-Git-Tag: releases/gcc-3.4.0~3864 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bad998e07ea294d3b712b99bce845139c21ecc7c;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 521a44a83409..165751244a84 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-09-06 Zdenek Dvorak + + * gcse.c (expr_equiv_p): Don't consider anything to be equal to + volatile mem. + 2003-09-06 Kaveh R. Ghazi * ggc-common.c (init_ggc_heuristics): Don't use the heuristics diff --git a/gcc/gcse.c b/gcc/gcse.c index 97796637e548..edc8a6257469 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. */