diff options
author | Julian Brown <julian@codesourcery.com> | 2013-05-18 03:48:18 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2013-05-17 21:48:18 -0600 |
commit | 2df013f3cd4c36b7e309758d9210e6cab0d5d83f (patch) | |
tree | 1ad77ed0fbaad974aac23c81dbb8249ba213341c /gcc/gcse.c | |
parent | 933f507d1fda886c1471c200f79b02e1c6d3fb2c (diff) | |
download | gcc-2df013f3cd4c36b7e309758d9210e6cab0d5d83f.zip gcc-2df013f3cd4c36b7e309758d9210e6cab0d5d83f.tar.gz gcc-2df013f3cd4c36b7e309758d9210e6cab0d5d83f.tar.bz2 |
gcse.c (compute_ld_motion_mems): If a non-simple MEM is found in a REG_EQUAL note, invalidate it.
* gcse.c (compute_ld_motion_mems): If a non-simple MEM is
found in a REG_EQUAL note, invalidate it.
From-SVN: r199049
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r-- | gcc/gcse.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -3894,6 +3894,8 @@ compute_ld_motion_mems (void) { rtx src = SET_SRC (PATTERN (insn)); rtx dest = SET_DEST (PATTERN (insn)); + rtx note = find_reg_equal_equiv_note (insn); + rtx src_eq; /* Check for a simple LOAD... */ if (MEM_P (src) && simple_mem (src)) @@ -3910,6 +3912,15 @@ compute_ld_motion_mems (void) invalidate_any_buried_refs (src); } + if (note != 0 && REG_NOTE_KIND (note) == REG_EQUAL) + src_eq = XEXP (note, 0); + else + src_eq = NULL_RTX; + + if (src_eq != NULL_RTX + && !(MEM_P (src_eq) && simple_mem (src_eq))) + invalidate_any_buried_refs (src_eq); + /* Check for stores. Don't worry about aliased ones, they will block any movement we might do later. We only care about this exact pattern since those are the only |