diff options
author | Richard Guenther <rguenther@suse.de> | 2010-04-03 17:14:44 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-04-03 17:14:44 +0000 |
commit | 2b22e3825d30db48c8d4eedba0a45591b19d0b9c (patch) | |
tree | eae4f0a5e42f63d453e85ed7b4d12881c574f707 | |
parent | 058ad7c406c515e42ea09e1ce4e082164b69f8b1 (diff) | |
download | gcc-2b22e3825d30db48c8d4eedba0a45591b19d0b9c.zip gcc-2b22e3825d30db48c8d4eedba0a45591b19d0b9c.tar.gz gcc-2b22e3825d30db48c8d4eedba0a45591b19d0b9c.tar.bz2 |
re PR middle-end/42509 (nonoverlapping_memrefs_p misinterprets NULL MEM_OFFSET as const0_rtx)
2010-04-03 Richard Guenther <rguenther@suse.de>
PR middle-end/42509
* alias.c (nonoverlapping_memrefs_p): For spill-slot accesses
require a non-NULL MEM_OFFSET.
From-SVN: r157954
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/alias.c | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e06d38c..2eb77c4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-04-03 Richard Guenther <rguenther@suse.de> + + PR middle-end/42509 + * alias.c (nonoverlapping_memrefs_p): For spill-slot accesses + require a non-NULL MEM_OFFSET. + 2010-04-02 Steven Bosscher <steven@gcc.gnu.org> * ada/gcc-interface/Make-lang.in, alias.c, attribs.c, auto-inc-dec.c, diff --git a/gcc/alias.c b/gcc/alias.c index 317aeba..cd7e2a0 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -2147,6 +2147,13 @@ nonoverlapping_memrefs_p (const_rtx x, const_rtx y) if (exprx == 0 || expry == 0) return 0; + /* For spill-slot accesses make sure we have valid offsets. */ + if ((exprx == get_spill_slot_decl (false) + && ! MEM_OFFSET (x)) + || (expry == get_spill_slot_decl (false) + && ! MEM_OFFSET (y))) + return 0; + /* If both are field references, we may be able to determine something. */ if (TREE_CODE (exprx) == COMPONENT_REF && TREE_CODE (expry) == COMPONENT_REF |