aboutsummaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@gcc.gnu.org>2006-11-11 17:10:56 -0800
committerAndrew Pinski <pinskia@gcc.gnu.org>2006-11-11 17:10:56 -0800
commitafa8f0fb33f62b3e9ea2fad0813372730d18295b (patch)
treec8284268269f7ffcd0974620bef89b17e3bd6242 /gcc/alias.c
parenta607b34fff050a8223e78f5ae1179a2e5bade795 (diff)
downloadgcc-afa8f0fb33f62b3e9ea2fad0813372730d18295b.zip
gcc-afa8f0fb33f62b3e9ea2fad0813372730d18295b.tar.gz
gcc-afa8f0fb33f62b3e9ea2fad0813372730d18295b.tar.bz2
re PR rtl-optimization/28812 (RTL aliasing vs may_alias and structs)
2006-11-11 Andrew Pinski <andrew_pinski@playstation.sony.com> PR rtl-opt/28812 * alias.c (fixed_scalar_and_varying_struct_p): Don't return a non null value if the struct memory access is in the 0th aliasing set. 2006-11-11 Andrew Pinski <andrew_pinski@playstation.sony.com> PR rtl-opt/28812 * gcc.c-torture/execute/mayalias-3.c: New test. From-SVN: r118716
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index 7c51ad7..d027b79 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -1857,13 +1857,15 @@ fixed_scalar_and_varying_struct_p (rtx mem1, rtx mem2, rtx mem1_addr,
if (! flag_strict_aliasing)
return NULL_RTX;
- if (MEM_SCALAR_P (mem1) && MEM_IN_STRUCT_P (mem2)
+ if (MEM_ALIAS_SET (mem2)
+ && MEM_SCALAR_P (mem1) && MEM_IN_STRUCT_P (mem2)
&& !varies_p (mem1_addr, 1) && varies_p (mem2_addr, 1))
/* MEM1 is a scalar at a fixed address; MEM2 is a struct at a
varying address. */
return mem1;
- if (MEM_IN_STRUCT_P (mem1) && MEM_SCALAR_P (mem2)
+ if (MEM_ALIAS_SET (mem1)
+ && MEM_IN_STRUCT_P (mem1) && MEM_SCALAR_P (mem2)
&& varies_p (mem1_addr, 1) && !varies_p (mem2_addr, 1))
/* MEM2 is a scalar at a fixed address; MEM1 is a struct at a
varying address. */