diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-27 08:35:25 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-27 08:35:25 +0000 |
commit | fc41dd820f53334fd95a07641cbbd733b7b9259b (patch) | |
tree | f44354f2300ceeaafa15d37492c626cbd7947142 /gcc/tree-ssa-address.c | |
parent | ec0b5f7df306d2cb5edc57ac08024cf114f805b5 (diff) | |
download | gcc-fc41dd820f53334fd95a07641cbbd733b7b9259b.tar.gz |
2011-05-27 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 174319 using svnmerge
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@174323 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-address.c')
-rw-r--r-- | gcc/tree-ssa-address.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/tree-ssa-address.c b/gcc/tree-ssa-address.c index 07d1d4db43b..2e6eabc8ccb 100644 --- a/gcc/tree-ssa-address.c +++ b/gcc/tree-ssa-address.c @@ -361,8 +361,11 @@ create_mem_ref_raw (tree type, tree alias_ptr_type, struct mem_address *addr, index2 = addr->base; } - /* If possible use a plain MEM_REF instead of a TARGET_MEM_REF. */ - if (alias_ptr_type + /* If possible use a plain MEM_REF instead of a TARGET_MEM_REF. + ??? As IVOPTs does not follow restrictions to where the base + pointer may point to create a MEM_REF only if we know that + base is valid. */ + if (TREE_CODE (base) == ADDR_EXPR && (!index2 || integer_zerop (index2)) && (!addr->index || integer_zerop (addr->index))) return fold_build2 (MEM_REF, type, base, addr->offset); |