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/111362] [14 Regression] '-fcompare-debug' failure (length) with -O -fno-tree-ch --param=max-completely-peel-times=0 -march=rv64iv
Date: Sun, 10 Mar 2024 02:39:28 +0000	[thread overview]
Message-ID: <bug-111362-4-OBZTzKiEML@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-111362-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jeff Law <law@gcc.gnu.org>:

https://gcc.gnu.org/g:50531b6d400945793a1d549e6ee941d989319d42

commit r14-9415-g50531b6d400945793a1d549e6ee941d989319d42
Author: jlaw <jeffreyalaw@gmail.com>
Date:   Sat Mar 9 19:27:32 2024 -0700

    [committed] [PR target/111362] Fix compare-debug issue with mode switching

    The issue here is the code we emit for mode-switching can change when -g is
    added to the command line.  This is caused by processing debug notes
occurring
    after a call which is the last real statement in a basic block.

    Without -g the CALL_INSN is literally the last insn in the block and the
loop
    exits.  If mode switching after the call is needed, it'll be handled as we
    process outgoing edges.

    With -g the loop iterates again and in the processing of the node the
backend
    signals that a mode switch is necessary.

    I pondered fixing this in the target, but the better fix is to ignore the
debug
    notes in the insn stream.

    I did a cursory review of some of the other compare-debug failures, but did
not
    immediately see others which would likely be fixed by this change.  Sigh.

    Anyway, bootstrapped and regression tested on x86.  Regression tested on
rv64
    as well.

            PR target/111362
    gcc/
            * mode-switching.cc (optimize_mode_switching): Only process
            NONDEBUG insns.

    gcc/testsuite

            * gcc.target/riscv/compare-debug-1.c: New test.
            * gcc.target/riscv/compare-debug-2.c: New test.

  parent reply	other threads:[~2024-03-10  2:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-10 11:15 [Bug target/111362] New: " zsojka at seznam dot cz
2023-09-12 12:20 ` [Bug target/111362] " rguenth at gcc dot gnu.org
2023-09-13  6:19 ` cvs-commit at gcc dot gnu.org
2023-09-14 15:10 ` zsojka at seznam dot cz
2024-03-09 17:46 ` law at gcc dot gnu.org
2024-03-09 23:45 ` law at gcc dot gnu.org
2024-03-10  2:39 ` cvs-commit at gcc dot gnu.org [this message]
2024-03-10  2:40 ` law 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-111362-4-OBZTzKiEML@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).