public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Matthias Kretz <mkretz@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r14-1463] libstdc++: Fix condition for supported SIMD types on ARMv8
Date: Thu,  1 Jun 2023 08:49:39 +0000 (GMT)	[thread overview]
Message-ID: <20230601084939.B7D693858D33@sourceware.org> (raw)

https://gcc.gnu.org/g:2fbbaa77c8468ed2bdf2cfa1a5890991e4e98eef

commit r14-1463-g2fbbaa77c8468ed2bdf2cfa1a5890991e4e98eef
Author: Matthias Kretz <m.kretz@gsi.de>
Date:   Thu Jun 1 10:40:14 2023 +0200

    libstdc++: Fix condition for supported SIMD types on ARMv8
    
    Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
    
    libstdc++-v3/ChangeLog:
    
            PR libstdc++/110050
            * include/experimental/bits/simd.h (__vectorized_sizeof): With
            __have_neon_a32 only single-precision float works (in addition
            to integers).

Diff:
---
 libstdc++-v3/include/experimental/bits/simd.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libstdc++-v3/include/experimental/bits/simd.h b/libstdc++-v3/include/experimental/bits/simd.h
index f94b8361ab0..834fe923065 100644
--- a/libstdc++-v3/include/experimental/bits/simd.h
+++ b/libstdc++-v3/include/experimental/bits/simd.h
@@ -2808,8 +2808,10 @@ template <typename _Tp>
 	  return 16;
 
 	// ARM:
-	if constexpr (__have_neon_a64
-		      || (__have_neon_a32 && !is_same_v<_Tp, double>) )
+	if constexpr (__have_neon_a64)
+	  return 16;
+	if constexpr (__have_neon_a32 and (not is_floating_point_v<_Tp>
+					     or is_same_v<_Tp, float>))
 	  return 16;
 	if constexpr (__have_neon
 		      && sizeof(_Tp) < 8

                 reply	other threads:[~2023-06-01  8:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20230601084939.B7D693858D33@sourceware.org \
    --to=mkretz@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-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).