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 rtl-optimization/114190] [14 regression] Wrong code with -O2 -fno-dce -fharden-compares -mvpclmulqdq --param=max-rtl-if-conversion-unpredictable-cost=136
Date: Wed, 06 Mar 2024 08:36:23 +0000	[thread overview]
Message-ID: <bug-114190-4-x4CGEjAsIW@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114190-4@http.gcc.gnu.org/bugzilla/>

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

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

https://gcc.gnu.org/g:1157d5de35b41eabe5ee51d532224864173c37bd

commit r14-9329-g1157d5de35b41eabe5ee51d532224864173c37bd
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Mar 6 09:35:37 2024 +0100

    i386: Fix up the vzeroupper REG_DEAD/REG_UNUSED note workaround [PR114190]

    When writing the rest_of_handle_insert_vzeroupper workaround to manually
    remove all the REG_DEAD/REG_UNUSED notes from the IL, I've missed that
    there is a df_analyze () call right after it and that the problems added
    earlier in the pass, like df_note_add_problem () done during mode
switching,
    doesn't affect just the next df_analyze () call right after it, but all
    other df_analyze () calls until the end of the current pass where
    df_finish_pass removes the optional problems.

    So, as can be seen on the following patch, the workaround doesn't actually
    work there, because while rest_of_handle_insert_vzeroupper carefully
removes
    all REG_DEAD/REG_UNUSED notes, the df_analyze () call at the end of the
    function immediately adds them in again (so, I must say I have no idea
    why the workaround worked on the earlier testcases).

    Now, I could move the df_analyze () call just before the
REG_DEAD/REG_UNUSED
    note removal loop, but I think the following patch is better, because
    the df_analyze () call doesn't have to recompute the problem when we don't
    care about it and will actively strip all traces of it away.

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

            PR rtl-optimization/114190
            * config/i386/i386-features.cc (rest_of_handle_insert_vzeroupper):
            Call df_remove_problem for df_note before calling df_analyze.

            * gcc.target/i386/avx-pr114190.c: New test.

  parent reply	other threads:[~2024-03-06  8:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01 12:11 [Bug tree-optimization/114190] New: wrong " zsojka at seznam dot cz
2024-03-01 20:58 ` [Bug target/114190] " pinskia at gcc dot gnu.org
2024-03-01 21:04 ` pinskia at gcc dot gnu.org
2024-03-01 21:08 ` [Bug rtl-optimization/114190] " pinskia at gcc dot gnu.org
2024-03-04  8:10 ` [Bug rtl-optimization/114190] [14 regression] Wrong " rguenth at gcc dot gnu.org
2024-03-04 13:19 ` rguenth at gcc dot gnu.org
2024-03-05  8:02 ` jakub at gcc dot gnu.org
2024-03-05  9:19 ` jakub at gcc dot gnu.org
2024-03-06  8:36 ` cvs-commit at gcc dot gnu.org [this message]
2024-03-06  8:37 ` 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-114190-4-x4CGEjAsIW@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).