public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/92658] x86 lacks vector extend / truncate
       [not found] <bug-92658-4@http.gcc.gnu.org/bugzilla/>
@ 2020-05-14 12:50 ` ubizjak at gmail dot com
  2020-05-14 13:20 ` rguenther at suse dot de
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 19+ messages in thread
From: ubizjak at gmail dot com @ 2020-05-14 12:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92658

--- Comment #10 from Uroš Bizjak <ubizjak at gmail dot com> ---
The patch is ready to be pushed, it is waiting for a decision what to do with
failed cases.

Richi, should this patch move forward (eventually XFAILing failed cases), or do
you plan to look at the fails from the generic vectorizer POV?

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug target/92658] x86 lacks vector extend / truncate
       [not found] <bug-92658-4@http.gcc.gnu.org/bugzilla/>
  2020-05-14 12:50 ` [Bug target/92658] x86 lacks vector extend / truncate ubizjak at gmail dot com
@ 2020-05-14 13:20 ` rguenther at suse dot de
  2020-05-14 13:41 ` rsandifo at gcc dot gnu.org
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 19+ messages in thread
From: rguenther at suse dot de @ 2020-05-14 13:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92658

--- Comment #11 from rguenther at suse dot de <rguenther at suse dot de> ---
On Thu, 14 May 2020, ubizjak at gmail dot com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92658
> 
> --- Comment #10 from Uroš Bizjak <ubizjak at gmail dot com> ---
> The patch is ready to be pushed, it is waiting for a decision what to do with
> failed cases.
> 
> Richi, should this patch move forward (eventually XFAILing failed cases), or do
> you plan to look at the fails from the generic vectorizer POV?

I think we should go forward with the patch, either XFAILing the testcases
or splitting out the testcase (and backend patterns that do not get
exercised due to the issue).

I've already said in comment#8 that the issue here is optabs working
with modes and not vector types, so it's a bit hard to use the
same mechanism to deal with the currently failing cases.  One
possible route would be to add V4QImode similar to how we now
do V2SFmode with SSE but of course where do we stop ...

As said we can try to tackle this incrementally.  Maybe Richard also
has input here?

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug target/92658] x86 lacks vector extend / truncate
       [not found] <bug-92658-4@http.gcc.gnu.org/bugzilla/>
  2020-05-14 12:50 ` [Bug target/92658] x86 lacks vector extend / truncate ubizjak at gmail dot com
  2020-05-14 13:20 ` rguenther at suse dot de
@ 2020-05-14 13:41 ` rsandifo at gcc dot gnu.org
  2020-05-15  8:18 ` crazylht at gmail dot com
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 19+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2020-05-14 13:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92658

--- Comment #12 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
(In reply to rguenther@suse.de from comment #11)
> On Thu, 14 May 2020, ubizjak at gmail dot com wrote:
> 
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92658
> > 
> > --- Comment #10 from Uroš Bizjak <ubizjak at gmail dot com> ---
> > The patch is ready to be pushed, it is waiting for a decision what to do with
> > failed cases.
> > 
> > Richi, should this patch move forward (eventually XFAILing failed cases), or do
> > you plan to look at the fails from the generic vectorizer POV?
> 
> I think we should go forward with the patch, either XFAILing the testcases
> or splitting out the testcase (and backend patterns that do not get
> exercised due to the issue).
> 
> I've already said in comment#8 that the issue here is optabs working
> with modes and not vector types, so it's a bit hard to use the
> same mechanism to deal with the currently failing cases.  One
> possible route would be to add V4QImode similar to how we now
> do V2SFmode with SSE but of course where do we stop ...
> 
> As said we can try to tackle this incrementally.  Maybe Richard also
> has input here?
Nothing to add really, but: yeah, the idea was that the target
would provide smaller vector modes if it can efficiently load,
store and (at least) add them.  I think it would be good to do
that for aarch64 Advanced SIMD at some point.

There are three points behind using vector modes for this:

1. It gives the target the flexibility to decide how best to
   implement the operation (All at one end, and if so, which end?
   Or spread out evenly across the vector?)  On aarch64, the
   choice would differ between SVE and Advanced SIMD.

2. It means that __attribute__((vector_size)) vectors benefit.

3. The smaller modes can be used in conjunction with
   autovectorize_vector_modes to give the loop vectoriser
   a choice between operating on packed or unpacked vectors.
   This is mostly useful for VECT_COMPARE_COSTS but can help
   with low-trip-count loops even without.

So yeah, defining V4QI sounds like the way to go if the
architecture can process it efficiently.  I get the "where
do we stop" concern, but .md mode iterators should help.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug target/92658] x86 lacks vector extend / truncate
       [not found] <bug-92658-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2020-05-14 13:41 ` rsandifo at gcc dot gnu.org
@ 2020-05-15  8:18 ` crazylht at gmail dot com
  2020-05-19  9:26 ` cvs-commit at gcc dot gnu.org
                   ` (14 subsequent siblings)
  18 siblings, 0 replies; 19+ messages in thread
From: crazylht at gmail dot com @ 2020-05-15  8:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92658

--- Comment #13 from Hongtao.liu <crazylht at gmail dot com> ---
*** Bug 92611 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug target/92658] x86 lacks vector extend / truncate
       [not found] <bug-92658-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2020-05-15  8:18 ` crazylht at gmail dot com
@ 2020-05-19  9:26 ` cvs-commit at gcc dot gnu.org
  2020-05-19  9:35 ` ubizjak at gmail dot com
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-19  9:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92658

--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Uros Bizjak <uros@gcc.gnu.org>:

https://gcc.gnu.org/g:f6e40195ec3d3b402a5f6c58dbf359479bc4cbfa

commit r11-485-gf6e40195ec3d3b402a5f6c58dbf359479bc4cbfa
Author: Uros Bizjak <ubizjak@gmail.com>
Date:   Tue May 19 11:25:46 2020 +0200

    i386: Add missing vector zero/sign extend expanders [PR92658]

    2020-05-19  Uroš Bizjak  <ubizjak@gmail.com>

    gcc/ChangeLog:
            PR target/92658
            * config/i386/sse.md (<code>v16qiv16hi2): New expander.
            (<code>v32qiv32hi2): Ditto.
            (<code>v8qiv8hi2): Ditto.
            (<code>v16qiv16si2): Ditto.
            (<code>v8qiv8si2): Ditto.
            (<code>v4qiv4si2): Ditto.
            (<code>v16hiv16si2): Ditto.
            (<code>v8hiv8si2): Ditto.
            (<code>v4hiv4si2): Ditto.
            (<code>v8qiv8di2): Ditto.
            (<code>v4qiv4di2): Ditto.
            (<code>v2qiv2di2): Ditto.
            (<code>v8hiv8di2): Ditto.
            (<code>v4hiv4di2): Ditto.
            (<code>v2hiv2di2): Ditto.
            (<code>v8siv8di2): Ditto.
            (<code>v4siv4di2): Ditto.
            (<code>v2siv2di2): Ditto.

    gcc/testsuite/ChangeLog:
            PR target/92658
            * gcc.target/i386/pr92658-sse4.c: New test.
            * gcc.target/i386/pr92658-avx2.c: New test.
            * gcc.target/i386/pr92658-avx512bw.c: New test.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug target/92658] x86 lacks vector extend / truncate
       [not found] <bug-92658-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2020-05-19  9:26 ` cvs-commit at gcc dot gnu.org
@ 2020-05-19  9:35 ` ubizjak at gmail dot com
  2020-05-20  5:12 ` crazylht at gmail dot com
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 19+ messages in thread
From: ubizjak at gmail dot com @ 2020-05-19  9:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92658

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |easyhack
           Assignee|ubizjak at gmail dot com           |unassigned at gcc dot gnu.org
                 CC|                            |ubizjak at gmail dot com
             Status|ASSIGNED                    |NEW

--- Comment #15 from Uroš Bizjak <ubizjak at gmail dot com> ---
I will leave truncations (Down Converts in Intel speak) which are AVX512F
instructions to someone else. It should be easy to add missing patterns and
tests following the example of committed patch.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug target/92658] x86 lacks vector extend / truncate
       [not found] <bug-92658-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2020-05-19  9:35 ` ubizjak at gmail dot com
@ 2020-05-20  5:12 ` crazylht at gmail dot com
  2020-05-20  8:16 ` crazylht at gmail dot com
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 19+ messages in thread
From: crazylht at gmail dot com @ 2020-05-20  5:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92658

--- Comment #16 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Uroš Bizjak from comment #15)
> I will leave truncations (Down Converts in Intel speak) which are AVX512F
> instructions to someone else. It should be easy to add missing patterns and
> tests following the example of committed patch.

I'll take a look.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug target/92658] x86 lacks vector extend / truncate
       [not found] <bug-92658-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2020-05-20  5:12 ` crazylht at gmail dot com
@ 2020-05-20  8:16 ` crazylht at gmail dot com
  2020-05-22 13:32 ` cvs-commit at gcc dot gnu.org
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 19+ messages in thread
From: crazylht at gmail dot com @ 2020-05-20  8:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92658

--- Comment #17 from Hongtao.liu <crazylht at gmail dot com> ---
Created attachment 48570
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48570&action=edit
0001-Add-missing-vector-truncmn2-expanders-PR92658.patch

Seems there're only truncmn2 for truncate, not expander for us_truncate and
ss_truncate, am i missing?

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug target/92658] x86 lacks vector extend / truncate
       [not found] <bug-92658-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2020-05-20  8:16 ` crazylht at gmail dot com
@ 2020-05-22 13:32 ` cvs-commit at gcc dot gnu.org
  2020-05-22 21:50 ` mark at gcc dot gnu.org
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-22 13:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92658

--- Comment #18 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by hongtao Liu <liuhongt@gcc.gnu.org>:

https://gcc.gnu.org/g:e740f3d73144abbca1ad98a04825c6bd63314a0b

commit r11-571-ge740f3d73144abbca1ad98a04825c6bd63314a0b
Author: liuhongt <hongtao.liu@intel.com>
Date:   Wed May 20 15:53:14 2020 +0800

    Add missing vector truncmn2 expanders [PR92658]

    2020-05-22  Hongtao.liu  <hongtao.liu@intel.com>

    gcc/ChangeLog:
            PR target/92658
            * config/i386/sse.md (trunc<pmov_src_lower><mode>2): New expander
            (truncv32hiv32qi2): Ditto.
            (trunc<ssedoublemodelower><mode>2): Ditto.
            (trunc<mode><pmov_dst_3>2): Ditto.
            (trunc<mode><pmov_dst_mode_4>2): Ditto.
            (truncv2div2si2): Ditto.
            (truncv8div8qi2): Ditto.
            (avx512f_<code>v8div16qi2): Renaming from
*avx512f_<code>v8div16qi2.
            (avx512vl_<code>v2div2si): Renaming from *avx512vl_<code>v2div2si2.
            (avx512vl_<code><mode>v2<ssecakarnum>qi2): Renaming
            from *avx512vl_<code><mode>v<ssescalarnum>qi2.

    gcc/testsuite/ChangeLog:
            * gcc.target/i386/pr92658-avx512f.c: New test.
            * gcc.target/i386/pr92658-avx512vl.c: Ditto.
            * gcc.target/i386/pr92658-avx512bw-trunc.c: Ditto.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug target/92658] x86 lacks vector extend / truncate
       [not found] <bug-92658-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2020-05-22 13:32 ` cvs-commit at gcc dot gnu.org
@ 2020-05-22 21:50 ` mark at gcc dot gnu.org
  2020-05-23  2:28 ` crazylht at gmail dot com
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 19+ messages in thread
From: mark at gcc dot gnu.org @ 2020-05-22 21:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92658

Mark Wielaard <mark at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark at gcc dot gnu.org

--- Comment #19 from Mark Wielaard <mark at gcc dot gnu.org> ---
(In reply to CVS Commits from comment #18)
>     gcc/testsuite/ChangeLog:
>             * gcc.target/i386/pr92658-avx512f.c: New test.
>             * gcc.target/i386/pr92658-avx512vl.c: Ditto.
>             * gcc.target/i386/pr92658-avx512bw-trunc.c: Ditto.

Note that the second one as committed has an extra closing brace which causes
an error:

ERROR: gcc.target/i386/pr92658-avx512vl.c: unknown dg option: \} for "}"

diff --git a/gcc/testsuite/gcc.target/i386/pr92658-avx512vl.c
b/gcc/testsuite/gcc.target/i386/pr92658-avx512vl.c
index 50b32f968ac3..dc50084119b5 100644
--- a/gcc/testsuite/gcc.target/i386/pr92658-avx512vl.c
+++ b/gcc/testsuite/gcc.target/i386/pr92658-avx512vl.c
@@ -121,7 +121,7 @@ truncdb_128 (v16qi * dst, v4si * __restrict src)
   dst[0] = *(v16qi *) tem;
 }

-/* { dg-final { scan-assembler-times "vpmovqd" 2 } } } */
+/* { dg-final { scan-assembler-times "vpmovqd" 2 } } */
 /* { dg-final { scan-assembler-times "vpmovqw" 2 { xfail *-*-* } } } */
 /* { dg-final { scan-assembler-times "vpmovqb" 2 { xfail *-*-* } } } */
 /* { dg-final { scan-assembler-times "vpmovdw" 1 } } */

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug target/92658] x86 lacks vector extend / truncate
       [not found] <bug-92658-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2020-05-22 21:50 ` mark at gcc dot gnu.org
@ 2020-05-23  2:28 ` crazylht at gmail dot com
  2020-12-25  2:19 ` crazylht at gmail dot com
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 19+ messages in thread
From: crazylht at gmail dot com @ 2020-05-23  2:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92658

--- Comment #20 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Mark Wielaard from comment #19)
> (In reply to CVS Commits from comment #18)
> >     gcc/testsuite/ChangeLog:
> >             * gcc.target/i386/pr92658-avx512f.c: New test.
> >             * gcc.target/i386/pr92658-avx512vl.c: Ditto.
> >             * gcc.target/i386/pr92658-avx512bw-trunc.c: Ditto.
> 
> Note that the second one as committed has an extra closing brace which
> causes an error:
> 
> ERROR: gcc.target/i386/pr92658-avx512vl.c: unknown dg option: \} for "}"
> 
> diff --git a/gcc/testsuite/gcc.target/i386/pr92658-avx512vl.c
> b/gcc/testsuite/gcc.target/i386/pr92658-avx512vl.c
> index 50b32f968ac3..dc50084119b5 100644
> --- a/gcc/testsuite/gcc.target/i386/pr92658-avx512vl.c
> +++ b/gcc/testsuite/gcc.target/i386/pr92658-avx512vl.c
> @@ -121,7 +121,7 @@ truncdb_128 (v16qi * dst, v4si * __restrict src)
>    dst[0] = *(v16qi *) tem;
>  }
>  
> -/* { dg-final { scan-assembler-times "vpmovqd" 2 } } } */
> +/* { dg-final { scan-assembler-times "vpmovqd" 2 } } */
>  /* { dg-final { scan-assembler-times "vpmovqw" 2 { xfail *-*-* } } } */
>  /* { dg-final { scan-assembler-times "vpmovqb" 2 { xfail *-*-* } } } */
>  /* { dg-final { scan-assembler-times "vpmovdw" 1 } } */

Oh, sorry for typo.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug target/92658] x86 lacks vector extend / truncate
       [not found] <bug-92658-4@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2020-05-23  2:28 ` crazylht at gmail dot com
@ 2020-12-25  2:19 ` crazylht at gmail dot com
  2020-12-25 10:32 ` ubizjak at gmail dot com
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 19+ messages in thread
From: crazylht at gmail dot com @ 2020-12-25  2:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92658

--- Comment #21 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to CVS Commits from comment #14)
> The master branch has been updated by Uros Bizjak <uros@gcc.gnu.org>:
> 
> https://gcc.gnu.org/g:f6e40195ec3d3b402a5f6c58dbf359479bc4cbfa
> 
> commit r11-485-gf6e40195ec3d3b402a5f6c58dbf359479bc4cbfa
> Author: Uros Bizjak <ubizjak@gmail.com>
> Date:   Tue May 19 11:25:46 2020 +0200
> 
>     i386: Add missing vector zero/sign extend expanders [PR92658]
>     
>     2020-05-19  Uroš Bizjak  <ubizjak@gmail.com>
>     
>     gcc/ChangeLog:
>             PR target/92658
>             * config/i386/sse.md (<code>v16qiv16hi2): New expander.
>             (<code>v32qiv32hi2): Ditto.
>             (<code>v8qiv8hi2): Ditto.
>             (<code>v16qiv16si2): Ditto.
>             (<code>v8qiv8si2): Ditto.
>             (<code>v4qiv4si2): Ditto.
>             (<code>v16hiv16si2): Ditto.
>             (<code>v8hiv8si2): Ditto.
>             (<code>v4hiv4si2): Ditto.
>             (<code>v8qiv8di2): Ditto.
>             (<code>v4qiv4di2): Ditto.
>             (<code>v2qiv2di2): Ditto.
>             (<code>v8hiv8di2): Ditto.
>             (<code>v4hiv4di2): Ditto.
>             (<code>v2hiv2di2): Ditto.
>             (<code>v8siv8di2): Ditto.
>             (<code>v4siv4di2): Ditto.
>             (<code>v2siv2di2): Ditto.
>     

<code> for sign_extend is sign_extend, but the standard pattern names for
sign_extend is extendmn. We need to to refine those expanders

Add define_code_attr like aarch64/iterators.md?

----------
;; Map rtl objects to optab names
(define_code_attr optab [(ashift "ashl")
                         (ashiftrt "ashr")
                         (lshiftrt "lshr")
                         (rotatert "rotr")
                         (sign_extend "extend")
                         (zero_extend "zero_extend")
----------

>     gcc/testsuite/ChangeLog:
>             PR target/92658
>             * gcc.target/i386/pr92658-sse4.c: New test.
>             * gcc.target/i386/pr92658-avx2.c: New test.
>             * gcc.target/i386/pr92658-avx512bw.c: New test.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug target/92658] x86 lacks vector extend / truncate
       [not found] <bug-92658-4@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2020-12-25  2:19 ` crazylht at gmail dot com
@ 2020-12-25 10:32 ` ubizjak at gmail dot com
  2020-12-29  1:36 ` crazylht at gmail dot com
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 19+ messages in thread
From: ubizjak at gmail dot com @ 2020-12-25 10:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92658

--- Comment #22 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Hongtao.liu from comment #21)
> Add define_code_attr like aarch64/iterators.md?
> 
> ----------
> ;; Map rtl objects to optab names
> (define_code_attr optab [(ashift "ashl")
> 			 (ashiftrt "ashr")
> 			 (lshiftrt "lshr")
> 			 (rotatert "rotr")
> 			 (sign_extend "extend")
> 			 (zero_extend "zero_extend")

Yes. Please go ahead, the patch is preapproved.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug target/92658] x86 lacks vector extend / truncate
       [not found] <bug-92658-4@http.gcc.gnu.org/bugzilla/>
                   ` (12 preceding siblings ...)
  2020-12-25 10:32 ` ubizjak at gmail dot com
@ 2020-12-29  1:36 ` crazylht at gmail dot com
  2021-01-07  6:35 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 19+ messages in thread
From: crazylht at gmail dot com @ 2020-12-29  1:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92658

--- Comment #23 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Uroš Bizjak from comment #22)
> (In reply to Hongtao.liu from comment #21)
> > Add define_code_attr like aarch64/iterators.md?
> > 
> > ----------
> > ;; Map rtl objects to optab names
> > (define_code_attr optab [(ashift "ashl")
> > 			 (ashiftrt "ashr")
> > 			 (lshiftrt "lshr")
> > 			 (rotatert "rotr")
> > 			 (sign_extend "extend")
> > 			 (zero_extend "zero_extend")
> 
> Yes. Please go ahead, the patch is preapproved.

Fixed by r11-6351

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug target/92658] x86 lacks vector extend / truncate
       [not found] <bug-92658-4@http.gcc.gnu.org/bugzilla/>
                   ` (13 preceding siblings ...)
  2020-12-29  1:36 ` crazylht at gmail dot com
@ 2021-01-07  6:35 ` cvs-commit at gcc dot gnu.org
  2021-12-15  0:53 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-07  6:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92658

--- Comment #24 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by hongtao Liu <liuhongt@gcc.gnu.org>:

https://gcc.gnu.org/g:1b5669752426d225b0088d57d1d2fffba9625032

commit r11-6514-g1b5669752426d225b0088d57d1d2fffba9625032
Author: Hongyu Wang <hongyu.wang@intel.com>
Date:   Tue Dec 29 15:14:09 2020 +0800

    Adjust testcase for PR 92658

    gcc/testsuite/ChangeLog:

            * gcc.target/i386/pr92658-avx512bw.c: Add
            -mprefer-vector-width=512 to avoid impact of different default
            mtune which gcc is built with.
            * gcc.target/i386/pr92658-avx512bw-2.c: Ditto.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug target/92658] x86 lacks vector extend / truncate
       [not found] <bug-92658-4@http.gcc.gnu.org/bugzilla/>
                   ` (14 preceding siblings ...)
  2021-01-07  6:35 ` cvs-commit at gcc dot gnu.org
@ 2021-12-15  0:53 ` pinskia at gcc dot gnu.org
  2021-12-15  1:46 ` crazylht at gmail dot com
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 19+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-15  0:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92658

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug target/92658] x86 lacks vector extend / truncate
       [not found] <bug-92658-4@http.gcc.gnu.org/bugzilla/>
                   ` (15 preceding siblings ...)
  2021-12-15  0:53 ` pinskia at gcc dot gnu.org
@ 2021-12-15  1:46 ` crazylht at gmail dot com
  2023-05-10 20:43 ` cvs-commit at gcc dot gnu.org
  2023-06-03  0:09 ` cvs-commit at gcc dot gnu.org
  18 siblings, 0 replies; 19+ messages in thread
From: crazylht at gmail dot com @ 2021-12-15  1:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92658

--- Comment #25 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Uroš Bizjak from comment #5)
> Created attachment 47927 [details]
> Prototype patch v2
> 
> A couple of typos fixed.
> 
> Still doesn't vectorize v4qi->v4si, v2qi->v2di, v2hi->v2di and v4qi->v4di.
> 
> Looks like tree-opt issue, as explained in Comment #4.

v4qi->v4si, v2hi->v2di and v4qi->v4di are vectorized, but v2qi->v2di is not,
guess it's related to 16-bit vector support.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug target/92658] x86 lacks vector extend / truncate
       [not found] <bug-92658-4@http.gcc.gnu.org/bugzilla/>
                   ` (16 preceding siblings ...)
  2021-12-15  1:46 ` crazylht at gmail dot com
@ 2023-05-10 20:43 ` cvs-commit at gcc dot gnu.org
  2023-06-03  0:09 ` cvs-commit at gcc dot gnu.org
  18 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-10 20:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92658

--- Comment #26 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Uros Bizjak <uros@gcc.gnu.org>:

https://gcc.gnu.org/g:608e7f3ab47fe746279c552c3574147aa3d8ee76

commit r14-666-g608e7f3ab47fe746279c552c3574147aa3d8ee76
Author: Uros Bizjak <ubizjak@gmail.com>
Date:   Wed May 10 22:40:53 2023 +0200

    i386: Add missing vector extend patterns [PR92658]

    Add missing insn pattern for v2qi -> v2si vector extend and named
    expanders to activate generation of vector extends to 8-byte and 4-byte
    vectors.

    gcc/ChangeLog:

            PR target/92658
            * config/i386/mmx.md (sse4_1_<code>v2qiv2si2): New insn pattern.
            (<insn>v4qiv4hi2): New expander.
            (<insn>v2hiv2si2): Ditto.
            (<insn>v2qiv2si2): Ditto.
            (<insn>v2qiv2hi2): Ditto.

    gcc/testsuite/ChangeLog:

            PR target/92658
            * gcc.target/i386/pr92658-sse4-4b.c: New test.
            * gcc.target/i386/pr92658-sse4-8b.c: New test.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug target/92658] x86 lacks vector extend / truncate
       [not found] <bug-92658-4@http.gcc.gnu.org/bugzilla/>
                   ` (17 preceding siblings ...)
  2023-05-10 20:43 ` cvs-commit at gcc dot gnu.org
@ 2023-06-03  0:09 ` cvs-commit at gcc dot gnu.org
  18 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-06-03  0:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92658

--- Comment #27 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by hongtao Liu <liuhongt@gcc.gnu.org>:

https://gcc.gnu.org/g:49337040865269e13cdc2ead276d12ecb2e9f606

commit r14-1509-g49337040865269e13cdc2ead276d12ecb2e9f606
Author: liuhongt <hongtao.liu@intel.com>
Date:   Thu Jun 1 15:08:02 2023 +0800

    i386: Add missing vector truncate patterns [PR92658].

    Add missing insn patterns for v2si -> v2hi/v2qi and v2hi-> v2qi vector
    truncate.

    gcc/ChangeLog:

            PR target/92658
            * config/i386/mmx.md (truncv2hiv2qi2): New define_insn.
            (truncv2si<mode>2): Ditto.

    gcc/testsuite/ChangeLog:

            * gcc.target/i386/pr92658-avx512bw-trunc-2.c: New test.

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2023-06-03  0:09 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-92658-4@http.gcc.gnu.org/bugzilla/>
2020-05-14 12:50 ` [Bug target/92658] x86 lacks vector extend / truncate ubizjak at gmail dot com
2020-05-14 13:20 ` rguenther at suse dot de
2020-05-14 13:41 ` rsandifo at gcc dot gnu.org
2020-05-15  8:18 ` crazylht at gmail dot com
2020-05-19  9:26 ` cvs-commit at gcc dot gnu.org
2020-05-19  9:35 ` ubizjak at gmail dot com
2020-05-20  5:12 ` crazylht at gmail dot com
2020-05-20  8:16 ` crazylht at gmail dot com
2020-05-22 13:32 ` cvs-commit at gcc dot gnu.org
2020-05-22 21:50 ` mark at gcc dot gnu.org
2020-05-23  2:28 ` crazylht at gmail dot com
2020-12-25  2:19 ` crazylht at gmail dot com
2020-12-25 10:32 ` ubizjak at gmail dot com
2020-12-29  1:36 ` crazylht at gmail dot com
2021-01-07  6:35 ` cvs-commit at gcc dot gnu.org
2021-12-15  0:53 ` pinskia at gcc dot gnu.org
2021-12-15  1:46 ` crazylht at gmail dot com
2023-05-10 20:43 ` cvs-commit at gcc dot gnu.org
2023-06-03  0:09 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).