public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/88601] We may consider adding __builtin_convertvector and __builtin_shufflevector for better compaitbility with Clang
       [not found] <bug-88601-4@http.gcc.gnu.org/bugzilla/>
@ 2020-04-18  0:45 ` jmuizelaar at mozilla dot com
  2020-04-18  2:03 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: jmuizelaar at mozilla dot com @ 2020-04-18  0:45 UTC (permalink / raw)
  To: gcc-bugs

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

Jeff Muizelaar <jmuizelaar at mozilla dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmuizelaar at mozilla dot com

--- Comment #3 from Jeff Muizelaar <jmuizelaar at mozilla dot com> ---
As heads up, we're also starting to use __builtin_shufflevector in Firefox:
https://searchfox.org/mozilla-central/source/gfx/wr/swgl/src/vector_type.h

We have a fallback for gcc, but it is not pretty.

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

* [Bug c++/88601] We may consider adding __builtin_convertvector and __builtin_shufflevector for better compaitbility with Clang
       [not found] <bug-88601-4@http.gcc.gnu.org/bugzilla/>
  2020-04-18  0:45 ` [Bug c++/88601] We may consider adding __builtin_convertvector and __builtin_shufflevector for better compaitbility with Clang jmuizelaar at mozilla dot com
@ 2020-04-18  2:03 ` pinskia at gcc dot gnu.org
  2020-06-21 17:30 ` [Bug c++/88601] We may consider adding __builtin_convertvector and __builtin_shufflevector for better compatibility " shawn at git dot icu
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2020-04-18  2:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jeff Muizelaar from comment #3)
> As heads up, we're also starting to use __builtin_shufflevector in Firefox:
> https://searchfox.org/mozilla-central/source/gfx/wr/swgl/src/vector_type.h
> 
> We have a fallback for gcc, but it is not pretty.

GCC has __builtin_shuffle but that is different from __builtin_shufflevector.
__builtin_shufflevector seems like a hack though.

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

* [Bug c++/88601] We may consider adding __builtin_convertvector and __builtin_shufflevector for better compatibility with Clang
       [not found] <bug-88601-4@http.gcc.gnu.org/bugzilla/>
  2020-04-18  0:45 ` [Bug c++/88601] We may consider adding __builtin_convertvector and __builtin_shufflevector for better compaitbility with Clang jmuizelaar at mozilla dot com
  2020-04-18  2:03 ` pinskia at gcc dot gnu.org
@ 2020-06-21 17:30 ` shawn at git dot icu
  2021-05-21 12:33 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: shawn at git dot icu @ 2020-06-21 17:30 UTC (permalink / raw)
  To: gcc-bugs

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

Shawn Landden <shawn at git dot icu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |shawn at git dot icu

--- Comment #5 from Shawn Landden <shawn at git dot icu> ---
We don't care if both are hacks. What we care about is an end to egregious
compiler incompatibilities.

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

* [Bug c++/88601] We may consider adding __builtin_convertvector and __builtin_shufflevector for better compatibility with Clang
       [not found] <bug-88601-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2020-06-21 17:30 ` [Bug c++/88601] We may consider adding __builtin_convertvector and __builtin_shufflevector for better compatibility " shawn at git dot icu
@ 2021-05-21 12:33 ` rguenth at gcc dot gnu.org
  2021-05-31  7:33 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-21 12:33 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-05-21
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine for __builtin_shufflevector.

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

* [Bug c++/88601] We may consider adding __builtin_convertvector and __builtin_shufflevector for better compatibility with Clang
       [not found] <bug-88601-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2021-05-21 12:33 ` rguenth at gcc dot gnu.org
@ 2021-05-31  7:33 ` cvs-commit at gcc dot gnu.org
  2021-05-31  7:48 ` rguenth at gcc dot gnu.org
  2021-09-17  6:40 ` pinskia at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-31  7:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

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

commit r12-1128-gef8176e0fac935c095cc39f4ecdfd43cdb8cb3f3
Author: Richard Biener <rguenther@suse.de>
Date:   Fri May 21 11:33:30 2021 +0200

    c++/88601 - [C/C++] __builtin_shufflevector support

    This adds support for the clang __builtin_shufflevector extension to
    the C and C++ frontends.  The builtin is lowered to VEC_PERM_EXPR.
    Because VEC_PERM_EXPR does not support different sized vector inputs
    or result or the special permute index of -1 (don't-care)
    c_build_shufflevector applies lowering by widening inputs and output
    to the widest vector, replacing -1 by a defined index and
    subsetting the final vector if we produced a wider result than
    desired.

    Code generation thus can be sub-optimal, followup patches will
    aim to fix that by recovering from part of the missing features
    during RTL expansion and by relaxing the constraints of the GIMPLE
    IL with regard to VEC_PERM_EXPR.

    2021-05-21  Richard Biener  <rguenther@suse.de>

            PR c++/88601
    gcc/c-family/
            * c-common.c: Include tree-vector-builder.h and
            vec-perm-indices.h.
            (c_common_reswords): Add __builtin_shufflevector.
            (c_build_shufflevector): New funtion.
            * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
            (c_build_shufflevector): Declare.

    gcc/c/
            * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
            * c-parser.c (c_parser_postfix_expression): Likewise.

    gcc/cp/
            * cp-objcp-common.c (names_builtin_p): Handle
            RID_BUILTIN_SHUFFLEVECTOR.
            * cp-tree.h (build_x_shufflevector): Declare.
            * parser.c (cp_parser_postfix_expression): Handle
            RID_BUILTIN_SHUFFLEVECTOR.
            * pt.c (tsubst_copy_and_build): Handle IFN_SHUFFLEVECTOR.
            * typeck.c (build_x_shufflevector): Build either a lowered
            VEC_PERM_EXPR or an unlowered shufflevector via a temporary
            internal function IFN_SHUFFLEVECTOR.

    gcc/
            * internal-fn.c (expand_SHUFFLEVECTOR): Define.
            * internal-fn.def (SHUFFLEVECTOR): New.
            * internal-fn.h (expand_SHUFFLEVECTOR): Declare.
            * doc/extend.texi: Document __builtin_shufflevector.

    gcc/testsuite/
            * c-c++-common/builtin-shufflevector-2.c: New testcase.
            * c-c++-common/torture/builtin-shufflevector-1.c: Likewise.
            * g++.dg/ext/builtin-shufflevector-1.C: Likewise.
            * g++.dg/ext/builtin-shufflevector-2.C: Likewise.

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

* [Bug c++/88601] We may consider adding __builtin_convertvector and __builtin_shufflevector for better compatibility with Clang
       [not found] <bug-88601-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2021-05-31  7:33 ` cvs-commit at gcc dot gnu.org
@ 2021-05-31  7:48 ` rguenth at gcc dot gnu.org
  2021-09-17  6:40 ` pinskia at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-31  7:48 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |12.0
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed for GCC 12.

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

* [Bug c++/88601] We may consider adding __builtin_convertvector and __builtin_shufflevector for better compatibility with Clang
       [not found] <bug-88601-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2021-05-31  7:48 ` rguenth at gcc dot gnu.org
@ 2021-09-17  6:40 ` pinskia at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-17  6:40 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0

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

end of thread, other threads:[~2021-09-17  6:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-88601-4@http.gcc.gnu.org/bugzilla/>
2020-04-18  0:45 ` [Bug c++/88601] We may consider adding __builtin_convertvector and __builtin_shufflevector for better compaitbility with Clang jmuizelaar at mozilla dot com
2020-04-18  2:03 ` pinskia at gcc dot gnu.org
2020-06-21 17:30 ` [Bug c++/88601] We may consider adding __builtin_convertvector and __builtin_shufflevector for better compatibility " shawn at git dot icu
2021-05-21 12:33 ` rguenth at gcc dot gnu.org
2021-05-31  7:33 ` cvs-commit at gcc dot gnu.org
2021-05-31  7:48 ` rguenth at gcc dot gnu.org
2021-09-17  6:40 ` pinskia 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).