summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2013-05-18 03:48:18 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2013-05-18 03:48:18 +0000
commitf473eb72a23bc82db0ee23e51fdd40b20417fb15 (patch)
tree1ad77ed0fbaad974aac23c81dbb8249ba213341c
parenta2bd0c99b983cc804fca616eea3408b17426c978 (diff)
downloadppe42-gcc-f473eb72a23bc82db0ee23e51fdd40b20417fb15.tar.gz
ppe42-gcc-f473eb72a23bc82db0ee23e51fdd40b20417fb15.zip
* gcse.c (compute_ld_motion_mems): If a non-simple MEM is
found in a REG_EQUAL note, invalidate it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199049 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/gcse.c11
2 files changed, 16 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4536e6279a1..d6eab5f2ef1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2013-05-17 Julian Brown <julian@codesourcery.com>
+
+ * gcse.c (compute_ld_motion_mems): If a non-simple MEM is
+ found in a REG_EQUAL note, invalidate it.
+
2013-05-17 Easwaran Raman <eraman@google.com>
* tree-ssa-reassoc.c (find_insert_point): New function.
diff --git a/gcc/gcse.c b/gcc/gcse.c
index 07043f76a4d..e485985ba72 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -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
OpenPOWER on IntegriCloud