Commit 2df013f3 by Julian Brown Committed by Jeff Law

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
parent 933f507d
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> 2013-05-17 Easwaran Raman <eraman@google.com>
* tree-ssa-reassoc.c (find_insert_point): New function. * tree-ssa-reassoc.c (find_insert_point): New function.
......
...@@ -3894,6 +3894,8 @@ compute_ld_motion_mems (void) ...@@ -3894,6 +3894,8 @@ compute_ld_motion_mems (void)
{ {
rtx src = SET_SRC (PATTERN (insn)); rtx src = SET_SRC (PATTERN (insn));
rtx dest = SET_DEST (PATTERN (insn)); rtx dest = SET_DEST (PATTERN (insn));
rtx note = find_reg_equal_equiv_note (insn);
rtx src_eq;
/* Check for a simple LOAD... */ /* Check for a simple LOAD... */
if (MEM_P (src) && simple_mem (src)) if (MEM_P (src) && simple_mem (src))
...@@ -3910,6 +3912,15 @@ compute_ld_motion_mems (void) ...@@ -3910,6 +3912,15 @@ compute_ld_motion_mems (void)
invalidate_any_buried_refs (src); 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 /* Check for stores. Don't worry about aliased ones, they
will block any movement we might do later. We only care will block any movement we might do later. We only care
about this exact pattern since those are the only about this exact pattern since those are the only
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment