On 23 Mar 13:28, Uros Bizjak wrote:
> On Wed, Mar 23, 2016 at 12:28 PM, Kirill Yukhin <kirill.yuk...@gmail.com> 
> wrote:
> > Hello,
> >
> > `vpcmpeqd' insn is only available in AVX2, however
> > [1] added check for AVX instead. Looks like a typo.
> >
> > Patch in the bottom fixes that.
> >
> > Bootstrapped, regtest still run.
> > Is it ok for main trunk if pass?
> >
> > gcc/
> >         * config/i386/i386.c (standard_sse_constant_opcode): Emit
> >         vpcmpeqd if AVX2 is enabled.
> >
> > [1] - https://gcc.gnu.org/ml/gcc-cvs/2011-09/msg00318.html
> 
> No, the change is OK (standard_sse_constant_p does all the checks),
> but nowadays we could write this part as:
> 
> --cut here--
> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
> index 1639704..59154c3 100644
> --- a/gcc/config/i386/i386.c
> +++ b/gcc/config/i386/i386.c
> @@ -10859,10 +10859,7 @@ standard_sse_constant_opcode (rtx_insn *insn, rtx x)
>           || get_attr_mode (insn) == MODE_V8DF
>           || get_attr_mode (insn) == MODE_V16SF)
>         return "vpternlogd\t{$0xFF, %g0, %g0, %g0|%g0, %g0, %g0, 0xFF}";
> -      if (TARGET_AVX)
> -       return "vpcmpeqd\t%0, %0, %0";
> -      else
> -       return "pcmpeqd\t%0, %0";
> +      return "%vpcmpeqd\t%0, %d0";
> 
>      default:
>        break;
> -- cut here--
This looks much better to me.
Going to bootstrap/regtest.

Is it ok to check into main trunk?

> 
> Uros.
> 

--
Thanks, K

Reply via email to