On Fri, 18 Mar 2016, Kirill Yukhin wrote:

> Hello,
> Intel spec [1] states that there're almost all broadcasting
> intructions variants available, except for (p. 2-4)
>       vbroadcastsd %xmm, %xmm
> It is safe to emit
>       vpbroadcastq %xmm, %xmm
> instead.
> 
> I was uable to extract a testcase, but if this insn is generated -
> we'll got asm error.
> 
> [1] - 
> https://software.intel.com/sites/default/files/managed/b4/3a/319433-024.pdf
> 
> Bootstrapped and regtested.
> 
> Richard,
> is it ok to check in to main trunk?

If it's ok with Uros yes.

Richard.

> gcc/
>       * config/i386/sse.md: Use vpbroadcastq for broadcasting DF
>       values to 128b regs.
> 
> --
> Thanks, K
> 
> commit 72e85f1b936d61edc93603862c810a8b4817b8a7
> Author: Kirill Yukhin <kirill.yuk...@intel.com>
> Date:   Thu Mar 17 18:05:22 2016 +0300
> 
>     AVX-512. Use vpbroadcastq for broadcasting DF values to 128b regs.
> 
> diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
> index 3c521b3..b25c246 100644
> --- a/gcc/config/i386/sse.md
> +++ b/gcc/config/i386/sse.md
> @@ -17269,7 +17269,14 @@
>           (match_operand:<ssexmmmode> 1 "nonimmediate_operand" "vm")
>           (parallel [(const_int 0)]))))]
>    "TARGET_AVX512F"
> -  "v<sseintprefix>broadcast<bcstscalarsuff>\t{%1, 
> %0<mask_operand2>|%0<mask_operand2>, %1}"
> +{
> +  /*  There is no DF broadcast (in AVX-512*) to 128b register.
> +      Mimic it with integer variant.  */
> +  if (<MODE>mode == V2DFmode)
> +    return "vpbroadcastq\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}";
> +  else
> +    return "v<sseintprefix>broadcast<bcstscalarsuff>\t{%1, 
> %0<mask_operand2>|%0<mask_operand2>, %1}";
> +}
>    [(set_attr "type" "ssemov")
>     (set_attr "prefix" "evex")
>     (set_attr "mode" "<sseinsnmode>")])
> 
> 

-- 
Richard Biener <rguent...@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 
21284 (AG Nuernberg)

Reply via email to