public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: William Schmidt <wschmidt@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/wschmidt/heads/builtins4)] rs6000: Empty overload stanzas don't work, fix that
Date: Wed,  9 Dec 2020 04:17:02 +0000 (GMT)	[thread overview]
Message-ID: <20201209041702.CDD053857025@sourceware.org> (raw)

https://gcc.gnu.org/g:83f4bc6eb4404e7ad4f006bbbdcdc500e29100ff

commit 83f4bc6eb4404e7ad4f006bbbdcdc500e29100ff
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date:   Tue Dec 8 22:16:42 2020 -0600

    rs6000: Empty overload stanzas don't work, fix that
    
    2020-12-08  Bill Schmidt  <wschmidt@linux.ibm.com>
    
    gcc/
            * config/rs6000/rs6000-overload.def (VEC_EXTRACT): Add single
            overload to register with the front end.
            (VEC_INSERT): Likewise.
            (VEC_PROMOTE): Likewise.
            (VEC_SPLATS): Likewise.
            (VEC_STEP): Likewise.

Diff:
---
 gcc/config/rs6000/rs6000-overload.def | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-overload.def b/gcc/config/rs6000/rs6000-overload.def
index 8922da3176c..7e4b091e06b 100644
--- a/gcc/config/rs6000/rs6000-overload.def
+++ b/gcc/config/rs6000/rs6000-overload.def
@@ -1097,8 +1097,12 @@
 
 ; There are no actual builtins for vec_extract.  There is special handling for
 ; this in altivec_resolve_overloaded_builtin in rs6000-c.c, where the call
-; is replaced by "pointer tricks."
+; is replaced by "pointer tricks."  The single overload here causes
+; __builtin_vec_extract to be registered with the front end so this can
+; happen.
 [VEC_EXTRACT, vec_extract, __builtin_vec_extract]
+  vsi __builtin_vec_extract (vsi, signed int);
+    VSPLTW  EXTRACT_FAKERY
 
 [VEC_EXTRACT_FP_FROM_SHORTH, vec_extract_fp32_from_shorth, __builtin_vec_vextract_fp_from_shorth, _ARCH_PWR9]
   vf __builtin_vec_vextract_fp_from_shorth (vus);
@@ -1316,8 +1320,11 @@
 
 ; There are no actual builtins for vec_insert.  There is special handling for
 ; this in altivec_resolve_overloaded_builtin in rs6000-c.c, where the call
-; is replaced by "pointer tricks."
+; is replaced by "pointer tricks."  The single overload here causes
+; __builtin_vec_insert to be registered with the front end so this can happen.
 [VEC_INSERT, vec_insert, __builtin_vec_insert]
+  vsi __builtin_vec_extract (vsi, vsi, signed int);
+    XXPERMDI_4SI  INSERT_FAKERY
 
 [VEC_INSERTH, vec_inserth, __builtin_vec_inserth, _ARCH_PWR10]
   vuc __builtin_vec_inserth (unsigned char, vuc, unsigned int);
@@ -2297,8 +2304,11 @@
 
 ; There are no actual builtins for vec_promote.  There is special handling for
 ; this in altivec_resolve_overloaded_builtin in rs6000-c.c, where the call
-; is replaced by a constructor.
+; is replaced by a constructor.  The single overload here causes
+; __builtin_vec_promote to be registered with the front end so that can happen.
 [VEC_PROMOTE, vec_promote, __builtin_vec_promote]
+  vsi __builtin_vec_promote (vsi);
+    ABS_V4SI PROMOTE_FAKERY
 
 [VEC_RE, vec_re, __builtin_vec_re]
   vf __builtin_vec_re (vf);
@@ -2753,8 +2763,11 @@
 
 ; There are no actual builtins for vec_splats.  There is special handling for
 ; this in altivec_resolve_overloaded_builtin in rs6000-c.c, where the call
-; is replaced by a constructor.
+; is replaced by a constructor.  The single overload here causes
+; __builtin_vec_splats to be registered with the front end so that can happen.
 [VEC_SPLATS, vec_splats, __builtin_vec_splats]
+  vsi __builtin_vec_splats (vsi);
+    ABS_V4SI SPLATS_FAKERY
 
 [VEC_SQRT, vec_sqrt, __builtin_vec_sqrt, __VSX__]
   vf __builtin_vec_sqrt (vf);
@@ -2984,7 +2997,11 @@
 
 ; There are no builtins for VEC_STEP; this is handled directly
 ; with a constant replacement in rs6000_resolve_overloaded_builtin.
+; The single overload registers __builtin_vec_step with the front end
+; so this can happen.
 [VEC_STEP, vec_step, __builtin_vec_step]
+  signed int __builtin_vec_step (vsi);
+    VCLZLSBB_V4SI  STEP_FAKERY
 
 [VEC_STL, vec_stl, __builtin_vec_stl]
   void __builtin_vec_stl (vsc, signed long long, vsc *);


             reply	other threads:[~2020-12-09  4:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09  4:17 William Schmidt [this message]
2020-12-16 18:09 William Schmidt
2021-02-07 18:16 William Schmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201209041702.CDD053857025@sourceware.org \
    --to=wschmidt@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).