PR rtl-optimization/87761
* regcprop.c (copyprop_hardreg_forward_1): Use REG_UNUSED notes to
detect obviously dead insns and delete them.
From-SVN: r269218
+2019-02-26 Jeff Law <law@redhat.com>
+
+ PR rtl-optimization/87761
+ * regcprop.c (copyprop_hardreg_forward_1): Use REG_UNUSED notes to
+ detect obviously dead insns and delete them.
+
2019-02-26 Richard Biener <rguenther@suse.de>
PR tree-optimization/89505
}
}
+ /* Detect obviously dead sets (via REG_UNUSED notes) and remove them. */
+ if (set
+ && INSN_P (insn)
+ && !may_trap_p (insn)
+ && find_reg_note (insn, REG_UNUSED, SET_DEST (set))
+ && !side_effects_p (SET_SRC (set))
+ && !side_effects_p (SET_DEST (set)))
+ {
+ bool last = insn == BB_END (bb);
+ delete_insn (insn);
+ if (last)
+ break;
+ continue;
+ }
+
+
extract_constrain_insn (insn);
preprocess_constraints (insn);
const operand_alternative *op_alt = which_op_alt ();