This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, i386] Disable AVX-512VL insns for scalar mode operands on -march=knl.
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Kirill Yukhin <kirill dot yukhin at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 4 Aug 2015 14:10:43 +0200
- Subject: Re: [PATCH, i386] Disable AVX-512VL insns for scalar mode operands on -march=knl.
- Authentication-results: sourceware.org; auth=none
- References: <20150804114734 dot GA32256 at msticlxl57 dot ims dot intel dot com>
On Tue, Aug 4, 2015 at 1:47 PM, Kirill Yukhin <kirill.yukhin@gmail.com> wrote:
> Hello,
>
> For vec_dup and vec_concat patterns (of v2df mode) second operand
> is of scalar mode, so `ix86_hard_regno_mode_okâ didnât block EVEX registers,
> of non-512b modes (when AVX-512VL is turned off).
> This turns into 128/256b xmm[>15] regs emit on -march=knl.
>
> Thereâre should be more patterns w/ similar issue. Will look for them later.
>
> Bootstrapped and regtested.
>
> If no objections, I'll commit it tomorrow morning (Moscow time).
>
> gcc/
> * config/i386/i386.md (define_attr "isa"): Addd avx512vl and
> noavx512vl.
> (define_attr "enabled"): Handle avx521vl and noavx512vl.
> * config/i386/sse.md (define_insn "vec_dupv2df<mask_name>"): Split
> AVX-512 alternative out of SSE.
> (define_insn "*vec_concatv2df"): Ditto.
>
> - (set_attr "prefix_data16" "*,*,*,1,*,*,*,*")
> - (set_attr "prefix" "orig,vex,maybe_vex,orig,vex,maybe_vex,orig,orig")
> - (set_attr "mode" "V2DF,V2DF,DF,V1DF,V1DF,DF,V4SF,V2SF")])
> + (set_attr "prefix_data16" "*,*,*,*,*,1,*,*,*,*")
Please change the above to:
(set (attr "prefix_data16")
(if_then_else (eq_attr "alternative" "5")
(const_string "1")
(const_string "*")))
Uros.