public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Matthias Kretz <m.kretz@gsi.de>
To: <gcc-patches@gcc.gnu.org>, <libstdc++@gcc.gnu.org>
Subject: Re: [PATCH] libstdc++: Fix find_last_set(simd_mask) to ignore padding bits
Date: Thu, 20 Jun 2024 09:28:20 +0200	[thread overview]
Message-ID: <4361415.ejJDZkT8p0@vir-laptop> (raw)
In-Reply-To: <2402789.jZfb76A358@centauriprime>

[-- Attachment #1: Type: text/plain, Size: 2644 bytes --]

Ping.

I fear that time to make GCC 11.5 is running out.

-Matthias

On Tuesday, 18 June 2024 08:22:13 GMT+2 Matthias Kretz wrote:
> Tested on x86_64-linux-gnu (also -m32 and -mx32), aarch64-linux-gnu, and
> arm- linux-gnueabi(hf).
> 
> OK for trunk and backports? OK, to go for GCC 11.5 as early as possible?
> 
> ----------------------- 8< -----------------------
> 
> With the change to the AVX512 find_last_set implementation, the change
> to AVX512 operator!= is unnecessary. However, the latter was not
> producing optimal code and unnecessarily set the padding bits. In
> theory, the compiler could determine that with the new !=
> implementation, the bit operation for clearing the padding bits is a
> no-op and can be elided.
> 
> Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
> 
> libstdc++-v3/ChangeLog:
> 
> 	PR libstdc++/115454
> 	* include/experimental/bits/simd_x86.h (_S_not_equal_to): Use
> 	neq comparison instead of bitwise negation after eq.
> 	(_S_find_last_set): Clear unused high bits before computing
> 	bit_width.
> 	* testsuite/experimental/simd/pr115454_find_last_set.cc: New
> 	test.
> ---
>  .../include/experimental/bits/simd_x86.h      | 26 +++++-----
>  .../simd/pr115454_find_last_set.cc            | 49 +++++++++++++++++++
>  2 files changed, 62 insertions(+), 13 deletions(-)
>  create mode 100644 libstdc++-v3/testsuite/experimental/simd/
> pr115454_find_last_set.cc
> 
> 
> --
> ──────────────────────────────────────────────────────────────────────────
>  Dr. Matthias Kretz                           https://mattkretz.github.io
>  GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
>  stdₓ::simd
> ──────────────────────────────────────────────────────────────────────────


-- 
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Center for Heavy Ion Research               https://gsi.de
 std::simd
──────────────────────────────────────────────────────────────────────────

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2024-06-20  7:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18  6:22 Matthias Kretz
2024-06-20  7:28 ` Matthias Kretz [this message]
2024-06-20 10:27 ` Jonathan Wakely

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=4361415.ejJDZkT8p0@vir-laptop \
    --to=m.kretz@gsi.de \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@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).