This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH i386 AVX512] [36/n] Extend gather insn patterns.
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Kirill Yukhin <kirill dot yukhin at gmail dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Richard Henderson <rth at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 11 Sep 2014 10:30:40 +0200
- Subject: Re: [PATCH i386 AVX512] [36/n] Extend gather insn patterns.
- Authentication-results: sourceware.org; auth=none
- References: <20140910131230 dot GC17361 at msticlxl57 dot ims dot intel dot com> <CAFULd4azHobjnzo5Rf7c19yz2tgVq+=yEgBXOYA_j2zDcuxwdg at mail dot gmail dot com>
On Wed, Sep 10, 2014 at 7:40 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
>> Patch in the bottom extends gather instructions support.
>>
>> Bootstrapped.
>> AVX-512* tests on top of patch-set all pass
>> under simulator.
>>
>> Is it ok for trunk?
>>
>> gcc/
>> * config/i386/sse.md
>> (define_expand "<avx512>_gathersi<mode>"): Rename from
>> "avx512f_gathersi<mode>".
>> (define_insn "*avx512f_gathersi<mode>"): Use VI48F.
>> (define_insn "*avx512f_gathersi<mode>_2"): Ditto.
>> (define_expand "<avx512>_gatherdi<mode>"): Rename from
>> "avx512f_gatherdi<mode>".
>> (define_insn "*avx512f_gatherdi<mode>"): Use VI48F.
>> (define_insn "*avx512f_gatherdi<mode>_2"): Use VI48F, add 128/256-bit
>> wide versions.
>> (define_expand "<avx512>_scattersi<mode>"): Rename from
>> "avx512f_scattersi<mode>".
>> (define_insn "*avx512f_scattersi<mode>"): Use VI48F.
>> (define_expand "<avx512>_scatterdi<mode>"): Rename from
>> "avx512f_scatterdi<mode>".
>> (define_insn "*avx512f_scatterdi<mode>"): Use VI48F.
>>
>
> ...
>
>> (define_insn "*avx512f_gatherdi<mode>_2"
>> - [(set (match_operand:VI48F_512 0 "register_operand" "=&v")
>> - (unspec:VI48F_512
>> + [(set (match_operand:VI48F 0 "register_operand" "=&v")
>> + (unspec:VI48F
>> [(pc)
>> (match_operand:QI 6 "register_operand" "1")
>> (match_operator:<ssescalarmode> 5 "vsib_mem_operator"
>> @@ -16762,22 +16762,27 @@
>> "TARGET_AVX512F"
>> {
>> if (<MODE>mode != <VEC_GATHER_SRCDI>mode)
>> - return "v<sseintprefix>gatherq<ssemodesuffix>\t{%5, %t0%{%1%}|%t0%{%1%}, %g5}";
>> + {
>> + if (GET_MODE_SIZE (<MODE>mode) != 64)
>
> Something is wrong here. Mode iterator is VI48F that always has mode
> size != 64, so the condition is always true.
Oh, I just mixed mode bitsize with mode size. Those sizes are huge ;)
The patch is OK.
Thanks,
Uros.