+2014-10-01 Segher Boessenkool <segher@kernel.crashing.org>
+
+ PR rtl-optimization/62151
+ * combine.c (can_combine_p): Allow the destination register of INSN
+ to be clobbered in I3.
+ (subst): Do not substitute into clobbers of registers.
+
2014-10-01 Jakub Jelinek <jakub@redhat.com>
PR debug/63342
for (i = XVECLEN (PATTERN (i3), 0) - 1; i >= 0; i--)
if (GET_CODE (XVECEXP (PATTERN (i3), 0, i)) == CLOBBER)
{
- /* Don't substitute for a register intended as a clobberable
- operand. */
rtx reg = XEXP (XVECEXP (PATTERN (i3), 0, i), 0);
- if (rtx_equal_p (reg, dest))
- return 0;
/* If the clobber represents an earlyclobber operand, we must not
substitute an expression containing the clobbered register.
|| (REG_P (X) && REG_P (Y) \
&& REGNO (X) == REGNO (Y) && GET_MODE (X) == GET_MODE (Y)))
+ /* Do not substitute into clobbers of regs -- this will never result in
+ valid RTL. */
+ if (GET_CODE (x) == CLOBBER && REG_P (XEXP (x, 0)))
+ return x;
+
if (! in_dest && COMBINE_RTX_EQUAL_P (x, from))
{
n_occurrences++;