This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix and improve avx2 broadcasts (PR target/63594)


On Tue, Oct 21, 2014 at 6:10 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> This patch fixes a bunch of recent regressions:
> FAIL: gcc.target/i386/avx-1.c (internal compiler error)
> FAIL: gcc.target/i386/avx-1.c (test for excess errors)
> FAIL: gcc.target/i386/avx-2.c (internal compiler error)
> FAIL: gcc.target/i386/avx-2.c (test for excess errors)
> FAIL: gcc.target/i386/avx512f-vec-init.c (internal compiler error)
> FAIL: gcc.target/i386/avx512f-vec-init.c (test for excess errors)
> UNRESOLVED: gcc.target/i386/avx512f-vec-init.c scan-assembler-times vbroadcastsd 1
> UNRESOLVED: gcc.target/i386/avx512f-vec-init.c scan-assembler-times vbroadcastss 1
> UNRESOLVED: gcc.target/i386/avx512f-vec-init.c scan-assembler-times vmovdqa64[ \\\\t]+%zmm 2
> UNRESOLVED: gcc.target/i386/avx512f-vec-init.c scan-assembler-times vpbroadcastb 2
> UNRESOLVED: gcc.target/i386/avx512f-vec-init.c scan-assembler-times vpbroadcastd 1
> UNRESOLVED: gcc.target/i386/avx512f-vec-init.c scan-assembler-times vpbroadcastq 1
> UNRESOLVED: gcc.target/i386/avx512f-vec-init.c scan-assembler-times vpbroadcastw 2
> FAIL: gcc.target/i386/sse-14.c (internal compiler error)
> FAIL: gcc.target/i386/sse-14.c (test for excess errors)
> FAIL: gcc.target/i386/sse-22.c (internal compiler error)
> FAIL: gcc.target/i386/sse-22.c (test for excess errors)
> FAIL: gcc.target/i386/sse-22a.c (internal compiler error)
> FAIL: gcc.target/i386/sse-22a.c (test for excess errors)
> FAIL: gcc.target/i386/sse-23.c (internal compiler error)
> FAIL: gcc.target/i386/sse-23.c (test for excess errors)
> FAIL: gcc.target/i386/sse-24.c (internal compiler error)
> FAIL: gcc.target/i386/sse-24.c (test for excess errors)
> and improves quality of code generated for AVX2 and AVX512F broadcasts;
> as AVX2 broadcast instructions can have source in memory or vector register
> (but only AVX512F can have it in GPRs), the patch adds splitter for the
> GPR case and adds ! for that, so that RA can choose what is best and if
> broadcast from GPR is desirable, it first performs vmovd from GPR into
> the dest register and then vpbroadcast{b,w,d} it.
>
> The AVX512* patterns should be IMHO merged, so that whether GPR or MEM is used
> are just alternatives of the same define_insn rather than different define_insns,
> but am not changing that right now, will leave that to Kirill as a follow-up.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> 2014-10-21  Jakub Jelinek  <jakub@redhat.com>
>
>         PR target/63594
>         * config/i386/i386.c (ix86_expand_vector_init_duplicate): For
>         V{8HI,16QI,16HI,32QI}mode call ix86_vector_duplicate_value
>         even for just TARGET_AVX2, not only for
>         TARGET_AVX512VL && TARGET_AVX512BW.  For V{32HI,64QI}mode,
>         call ix86_vector_duplicate_value only if TARGET_AVX512BW,
>         otherwise build it using concatenation of 256-bit
>         broadcast.
>         * config/i386/sse.md (AVX_VEC_DUP_MODE): Moved after
>         avx512 broadcast patterns.
>         (vec_dup<mode>): Likewise.  For avx2 use
>         v<sseintprefix>broadcast<bcstscalarsuff> instead of
>         vbroadcast<ssescalarmodesuffix>.
>         (AVX2_VEC_DUP_MODE): New mode iterator.
>         (*vec_dup<mode>): New TARGET_AVX2 define_insn with
>         AVX2_VEC_DUP_MODE iterator, add a splitter for that.
>
>         * gcc.dg/pr63594-1.c: New test.
>         * gcc.dg/pr63594-2.c: New test.
>         * gcc.target/i386/sse2-pr63594-1.c: New test.
>         * gcc.target/i386/sse2-pr63594-2.c: New test.
>         * gcc.target/i386/avx-pr63594-1.c: New test.
>         * gcc.target/i386/avx-pr63594-2.c: New test.
>         * gcc.target/i386/avx2-pr63594-1.c: New test.
>         * gcc.target/i386/avx2-pr63594-2.c: New test.
>         * gcc.target/i386/avx512f-pr63594-1.c: New test.
>         * gcc.target/i386/avx512f-pr63594-2.c: New test.
>         * gcc.target/i386/avx512f-vec-init.c: Adjust expected
>         insn counts.

OK.

Thanks,
Uros.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]