+2019-05-14 Chenghua Xu <paul.hua.gm@gmail.com>
+
+ PR target/90357
+ * config/mips/mips.c (mips_split_move): Skip forward SRC into
+ next insn when the SRC reg is dead.
+
2019-05-14 Bin Cheng <bin.cheng@linux.alibaba.com>
* gimple-ssa-strength-reduction.c (lookup_cand): Adjust index by 1.
can forward SRC for DEST. This is most useful if the next insn is a
simple store. */
rtx_insn *insn = (rtx_insn *)insn_;
+ struct mips_address_info addr;
if (insn)
{
rtx_insn *next = next_nonnote_nondebug_insn_bb (insn);
{
rtx set = single_set (next);
if (set && SET_SRC (set) == dest)
- validate_change (next, &SET_SRC (set), src, false);
+ {
+ if (MEM_P (src))
+ {
+ rtx tmp = XEXP (src, 0);
+ mips_classify_address (&addr, tmp, GET_MODE (tmp), true);
+ if (REGNO (addr.reg) != REGNO (dest))
+ validate_change (next, &SET_SRC (set), src, false);
+ }
+ else
+ validate_change (next, &SET_SRC (set), src, false);
+ }
}
}
}