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 middle-end/111260] [14 Regression] arm/aarch64: ice in maybe_legitimize_operand with ?: and constants and different types since r14-2667-gceae1400cf24f329393e96dd9720
Date: Thu, 14 Dec 2023 21:39:19 +0000	[thread overview]
Message-ID: <bug-111260-4-1YwkS7XqbF@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-111260-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #12 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:

https://gcc.gnu.org/g:5fa27d9f8c4bec65887654e374146926d76690b0

commit r14-6562-g5fa27d9f8c4bec65887654e374146926d76690b0
Author: Andrew Pinski <quic_apinski@quicinc.com>
Date:   Tue Dec 12 21:55:50 2023 -0800

    middle-end: Fix up constant handling in emit_conditional_move [PR111260]

    After r14-2667-gceae1400cf24f329393e96dd9720, we force a constant to a
register
    if it is shared with one of the other operands. The problem is used the
comparison
    mode for the register but that could be different from the operand mode.
This
    causes some issues on some targets.
    To fix it, we need to make sure the mode of the comparison matches the mode
    of the other operands, before we can compare the constants (CONST_INT has
no
    modes so compare_rtx returns true if they have the same value even if the
usage
    is in a different mode).

    Bootstrapped and tested on both aarch64-linux-gnu and x86_64-linux.

            PR middle-end/111260

    gcc/ChangeLog:

            * optabs.cc (emit_conditional_move): Change the modes to be
            equal before forcing the constant to a register.

    gcc/testsuite/ChangeLog:

            * gcc.c-torture/compile/condmove-1.c: New test.

    Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>

  parent reply	other threads:[~2023-12-14 21:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-31 18:48 [Bug target/111260] New: arm: ice in maybe_legitimize_operand, at optabs.cc:8054 dcb314 at hotmail dot com
2023-09-01  8:09 ` [Bug target/111260] " dcb314 at hotmail dot com
2023-10-06  4:52 ` zsojka at seznam dot cz
2023-10-06  5:04 ` pinskia at gcc dot gnu.org
2023-10-06  5:09 ` zsojka at seznam dot cz
2023-10-06  8:45 ` [Bug middle-end/111260] [14 Regression] " pinskia at gcc dot gnu.org
2023-10-06  8:48 ` pinskia at gcc dot gnu.org
2023-10-06  8:48 ` pinskia at gcc dot gnu.org
2023-10-06  8:51 ` pinskia at gcc dot gnu.org
2023-10-06  8:53 ` pinskia at gcc dot gnu.org
2023-10-17 12:29 ` [Bug target/111260] [14 Regression] arm/aarch64: " rguenth at gcc dot gnu.org
2023-10-17 16:00 ` [Bug middle-end/111260] [14 Regression] arm/aarch64: ice in maybe_legitimize_operand with ?: and constants and different types since r14-2667-gceae1400cf24f329393e96dd9720 pinskia at gcc dot gnu.org
2023-12-13  6:00 ` pinskia at gcc dot gnu.org
2023-12-13 16:52 ` pinskia at gcc dot gnu.org
2023-12-14 21:39 ` cvs-commit at gcc dot gnu.org [this message]
2023-12-14 21:39 ` pinskia 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-111260-4-1YwkS7XqbF@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).