@@ -3894,6 +3894,7 @@ 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);
/* Check for a simple LOAD... */
if (MEM_P (src) && simple_mem (src))
@@ -3910,6 +3911,11 @@ compute_ld_motion_mems (void)
invalidate_any_buried_refs (src);
}
+ /* Also invalidate any buried loads which may be present in
+ REG_EQUAL notes. */
+ if (note != NULL_RTX && REG_NOTE_KIND (note) == REG_EQUAL)
+ invalidate_any_buried_refs (XEXP (note, 0));
+
/* 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