diff options
author | Kyrylo Tkachov <kyrylo.tkachov@arm.com> | 2015-11-26 13:07:29 +0000 |
---|---|---|
committer | Kyrylo Tkachov <ktkachov@gcc.gnu.org> | 2015-11-26 13:07:29 +0000 |
commit | f0e87513309ee6f01429bcbd2983e2b526495319 (patch) | |
tree | 7e2061437de8641558ef38e8b3faf91634af6e46 /gcc/combine.c | |
parent | 5564c379b0dfde52cc06d611a38ad0b70fc4a3c8 (diff) | |
download | gcc-f0e87513309ee6f01429bcbd2983e2b526495319.zip gcc-f0e87513309ee6f01429bcbd2983e2b526495319.tar.gz gcc-f0e87513309ee6f01429bcbd2983e2b526495319.tar.bz2 |
[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
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 4958d3b..71b1656 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -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)) 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. */ if (code == MULT && (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) && (GET_CODE (XEXP (x, 1)) == ZERO_EXTEND || GET_CODE (XEXP (x, 1)) == SIGN_EXTEND) && REG_P (XEXP (XEXP (x, 0), 0)) - && REG_P (XEXP (XEXP (x, 1), 0))) - { - if (from == to) - return x; - else - return gen_rtx_CLOBBER (GET_MODE (x), const0_rtx); - } + && REG_P (XEXP (XEXP (x, 1), 0)) + && from == to) + return x; + /* Get the mode of operand 0 in case X is now a SIGN_EXTEND of a constant. */ |