diff options
author | Richard Guenther <rguenther@suse.de> | 2009-09-23 15:40:55 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-09-23 15:40:55 +0000 |
commit | 4c6858252cf0b39482c1a436f6d9dcd7cc0a44f9 (patch) | |
tree | 42a90a655ef734909b7d92e4671738d898cee10d | |
parent | 659ad88e5ff3676400c9bddfb0d1b3854f4581bb (diff) | |
download | gcc-4c6858252cf0b39482c1a436f6d9dcd7cc0a44f9.zip gcc-4c6858252cf0b39482c1a436f6d9dcd7cc0a44f9.tar.gz gcc-4c6858252cf0b39482c1a436f6d9dcd7cc0a44f9.tar.bz2 |
alias.c (ao_ref_from_mem): Correct for negative MEM_OFFSET produced for bigendian targets with promoted...
2009-09-23 Richard Guenther <rguenther@suse.de>
* alias.c (ao_ref_from_mem): Correct for negative MEM_OFFSET
produced for bigendian targets with promoted subregs.
From-SVN: r152083
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/alias.c | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 634c4cc..47bef8c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2009-09-23 Richard Guenther <rguenther@suse.de> + * alias.c (ao_ref_from_mem): Correct for negative MEM_OFFSET + produced for bigendian targets with promoted subregs. + +2009-09-23 Richard Guenther <rguenther@suse.de> + * value-prof.c (gimple_ic): Purge old EH edges only after building the new ones. diff --git a/gcc/alias.c b/gcc/alias.c index eaa127e..6bb051e 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -309,6 +309,18 @@ ao_ref_from_mem (ao_ref *ref, const_rtx mem) ref->offset = 0; ref->max_size = -1; } + else if (INTVAL (MEM_OFFSET (mem)) < 0 + && MEM_EXPR (mem) != get_spill_slot_decl (false)) + { + /* Negative MEM_OFFSET happens for promoted subregs on bigendian + targets. We need to compensate both the size and the offset here, + which get_ref_base_and_extent will have done based on the MEM_EXPR + already. */ + gcc_assert (((INTVAL (MEM_SIZE (mem)) + INTVAL (MEM_OFFSET (mem))) + * BITS_PER_UNIT) + == ref->size); + return true; + } else { ref->offset += INTVAL (MEM_OFFSET (mem)) * BITS_PER_UNIT; |