diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-09-04 18:16:24 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-09-04 18:16:24 +0000 |
commit | eae726e9e188dae97f8baaed76a408e8f1567e85 (patch) | |
tree | c26952d4fe2c91ddbb7b057e700a75ec0c0fc84b /gcc/alias.c | |
parent | bc343e4a4ce388d186730164ec9c259d5a41867b (diff) | |
download | gcc-eae726e9e188dae97f8baaed76a408e8f1567e85.tar.gz |
* alias.c (read_dependence): Return true for ALIAS_SET_MEMORY_BARRIER.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190941 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/alias.c')
-rw-r--r-- | gcc/alias.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/alias.c b/gcc/alias.c index c1d5c8a8f36..b7182074c5d 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -2177,12 +2177,18 @@ memrefs_conflict_p (int xsize, rtx x, int ysize, rtx y, HOST_WIDE_INT c) storeqi_unaligned pattern. */ /* Read dependence: X is read after read in MEM takes place. There can - only be a dependence here if both reads are volatile. */ + only be a dependence here if both reads are volatile, or if either is + an explicit barrier. */ int read_dependence (const_rtx mem, const_rtx x) { - return MEM_VOLATILE_P (x) && MEM_VOLATILE_P (mem); + if (MEM_VOLATILE_P (x) && MEM_VOLATILE_P (mem)) + return true; + if (MEM_ALIAS_SET (x) == ALIAS_SET_MEMORY_BARRIER + || MEM_ALIAS_SET (mem) == ALIAS_SET_MEMORY_BARRIER) + return true; + return false; } /* Return true if we can determine that the fields referenced cannot |