Hi! On Mon, Jan 08, 2018 at 08:41:55PM +0100, Uros Bizjak wrote: > Attached patch corrects wrong mode argument in the call to > force_to_mode call for ASHIFT operator. The patch uses "mode" mode, > the same as for all binop and unop operators in the force_int_to_mode > function. > > Also, the unpatched function would force operand to op_mode and later > truncate to op_mode again, so it all looks like a typo to me.
Indeed. > 2018-01-08 Uros Bizjak <ubiz...@gmail.com> > > PR target/83628 > * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of > op_mode in the force_to_mode call. > > Together with a follow-up target patch, the patch fixes > gcc.target/alpha/pr83628-2.c scan-asm failures on alpha. > > 2018-01-08 Uros Bizjak <ubiz...@gmail.com> > > PR target/83628 > * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of > op_mode in the force_to_mode call. > > Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. > > OK for mainline and branches? OK for trunk; OK for the branches after a suitable burn-in period. Thanks, Segher > diff --git a/gcc/combine.c b/gcc/combine.c > index 3a42de53455c..6adc0a7d6f85 100644 > --- a/gcc/combine.c > +++ b/gcc/combine.c > @@ -8908,7 +8908,7 @@ force_int_to_mode (rtx x, scalar_int_mode mode, > scalar_int_mode xmode, > mask = fuller_mask; > > op0 = gen_lowpart_or_truncate (op_mode, > - force_to_mode (XEXP (x, 0), op_mode, > + force_to_mode (XEXP (x, 0), mode, > mask, next_select)); > > if (op_mode != xmode || op0 != XEXP (x, 0))