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 target/114310] [11/12/13 Regression] [aarch64] __sync_val_compare_and_swap fails on __int128_t with newval = 0
Date: Fri, 15 Mar 2024 23:29:32 +0000	[thread overview]
Message-ID: <bug-114310-4-Yxr9fJdnwy@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114310-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:1c907cee6163a3ec2c0edaebeace73e2d32835ee

commit r13-8450-g1c907cee6163a3ec2c0edaebeace73e2d32835ee
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Thu Mar 14 14:09:20 2024 +0100

    aarch64: Fix TImode __sync_*_compare_and_exchange expansion with LSE
[PR114310]

    The following testcase ICEs with LSE atomics.
    The problem is that the @atomic_compare_and_swap<mode> expander uses
    aarch64_reg_or_zero predicate for the desired operand, which is fine,
    given that for most of the modes and even for TImode in some cases
    it can handle zero immediate just fine, but the TImode
    @aarch64_compare_and_swap<mode>_lse just uses register_operand for
    that operand instead, again intentionally so, because the casp,
    caspa, caspl and caspal instructions need to use a pair of consecutive
    registers for the operand and xzr is just one register and we can't
    just store zero into the link register to emulate pair of zeros.

    So, the following patch fixes that by forcing the newval operand into
    a register for the TImode LSE case.

    2024-03-14  Jakub Jelinek  <jakub@redhat.com>

            PR target/114310
            * config/aarch64/aarch64.cc (aarch64_expand_compare_and_swap): For
            TImode force newval into a register.

            * gcc.dg/pr114310.c: New test.

    (cherry picked from commit 9349aefa1df7ae36714b7b9f426ad46e314892d1)

  parent reply	other threads:[~2024-03-15 23:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-11 17:48 [Bug c/114310] New: " p.nguyen at yahooinc dot com
2024-03-11 18:01 ` [Bug target/114310] [11/12/13/14 Regression] " pinskia at gcc dot gnu.org
2024-03-12  0:13 ` law at gcc dot gnu.org
2024-03-12  0:25 ` pinskia at gcc dot gnu.org
2024-03-12 12:03 ` rguenth at gcc dot gnu.org
2024-03-13 18:13 ` jakub at gcc dot gnu.org
2024-03-14 13:10 ` cvs-commit at gcc dot gnu.org
2024-03-14 15:34 ` [Bug target/114310] [11/12/13 " jakub at gcc dot gnu.org
2024-03-15 23:29 ` cvs-commit at gcc dot gnu.org [this message]
2024-03-18 14:41 ` [Bug target/114310] [11/12 " jakub 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-114310-4-Yxr9fJdnwy@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).