Commit f0e87513 by Kyrylo Tkachov Committed by Kyrylo Tkachov

[combine] Only restrict pure simplification in mult-extend subst case, allow other substitutions

	* combine.c (subst): Do not return clobber of zero in widening mult
	case.  Just return x unchanged if it is a no-op substitution.

From-SVN: r230946
parent 5564c379
2015-11-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* combine.c (subst): Do not return clobber of zero in widening mult
case. Just return x unchanged if it is a no-op substitution.
2015-11-26 Vladimir Makarov <vmakarov@redhat.com> 2015-11-26 Vladimir Makarov <vmakarov@redhat.com>
PR target/68416 PR target/68416
...@@ -5285,7 +5285,7 @@ subst (rtx x, rtx from, rtx to, int in_dest, int in_cond, int unique_copy) ...@@ -5285,7 +5285,7 @@ subst (rtx x, rtx from, rtx to, int in_dest, int in_cond, int unique_copy)
|| GET_CODE (SET_DEST (x)) == PC)) || GET_CODE (SET_DEST (x)) == PC))
fmt = "ie"; fmt = "ie";
/* Substituting into the operands of a widening MULT is not likely /* Trying to simplify the operands of a widening MULT is not likely
to create RTL matching a machine insn. */ to create RTL matching a machine insn. */
if (code == MULT if (code == MULT
&& (GET_CODE (XEXP (x, 0)) == ZERO_EXTEND && (GET_CODE (XEXP (x, 0)) == ZERO_EXTEND
...@@ -5293,13 +5293,10 @@ subst (rtx x, rtx from, rtx to, int in_dest, int in_cond, int unique_copy) ...@@ -5293,13 +5293,10 @@ subst (rtx x, rtx from, rtx to, int in_dest, int in_cond, int unique_copy)
&& (GET_CODE (XEXP (x, 1)) == ZERO_EXTEND && (GET_CODE (XEXP (x, 1)) == ZERO_EXTEND
|| GET_CODE (XEXP (x, 1)) == SIGN_EXTEND) || GET_CODE (XEXP (x, 1)) == SIGN_EXTEND)
&& REG_P (XEXP (XEXP (x, 0), 0)) && REG_P (XEXP (XEXP (x, 0), 0))
&& REG_P (XEXP (XEXP (x, 1), 0))) && REG_P (XEXP (XEXP (x, 1), 0))
{ && from == to)
if (from == to) return x;
return x;
else
return gen_rtx_CLOBBER (GET_MODE (x), const0_rtx);
}
/* Get the mode of operand 0 in case X is now a SIGN_EXTEND of a /* Get the mode of operand 0 in case X is now a SIGN_EXTEND of a
constant. */ constant. */
......
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