public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/115454] std::experimental::find_last_set is buggy on x86-64-v4
Date: Thu, 20 Jun 2024 18:44:39 +0000	[thread overview]
Message-ID: <bug-115454-4-io5ye0zB9B@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-115454-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Matthias Kretz
<mkretz@gcc.gnu.org>:

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

commit r11-11517-ga0b92a530ad61389c0cdeb8d8ece4677e019c28e
Author: Matthias Kretz <m.kretz@gsi.de>
Date:   Fri Jun 14 15:11:25 2024 +0200

    libstdc++: Fix find_last_set(simd_mask) to ignore padding bits

    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.

    (cherry picked from commit 4787960dcaf0de3f46464960f5246de9b3c69a06)

  parent reply	other threads:[~2024-06-20 18:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-12  3:16 [Bug libstdc++/115454] New: " lee.imple at gmail dot com
2024-06-13 12:17 ` [Bug libstdc++/115454] " mkretz at gcc dot gnu.org
2024-06-14 13:45 ` mkretz at gcc dot gnu.org
2024-06-14 13:48 ` mkretz at gcc dot gnu.org
2024-06-20 10:57 ` cvs-commit at gcc dot gnu.org
2024-06-20 18:41 ` cvs-commit at gcc dot gnu.org
2024-06-20 18:44 ` cvs-commit at gcc dot gnu.org [this message]
2024-06-21 16:25 ` cvs-commit at gcc dot gnu.org
2024-06-21 16:26 ` cvs-commit at gcc dot gnu.org
2024-06-27 10:24 ` cvs-commit at gcc dot gnu.org
2024-06-27 11:16 ` cvs-commit at gcc dot gnu.org
2024-06-27 11:33 ` cvs-commit at gcc dot gnu.org
2024-06-27 11:46 ` cvs-commit at gcc dot gnu.org

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=bug-115454-4-io5ye0zB9B@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).