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 tree-optimization/104307] [11 Regression] '-fcompare-debug' failure (length) w/ -mavx512f -O2
Date: Sat, 19 Feb 2022 08:02:15 +0000	[thread overview]
Message-ID: <bug-104307-4-ftmIGkOkos@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-104307-4@http.gcc.gnu.org/bugzilla/>

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

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

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

commit r11-9596-gc81d1a061e5cfab6bd276c5be4cd6161b11e6d44
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Feb 1 16:02:54 2022 +0100

    veclower: Fix up -fcompare-debug issue in expand_vector_comparison
[PR104307]

    The following testcase fails -fcompare-debug, because
expand_vector_comparison
    since r11-1786-g1ac9258cca8030745d3c0b8f63186f0adf0ebc27 sets
    vec_cond_expr_only when it sees some use other than VEC_COND_EXPR that uses
    the lhs in its condition.
    Obviously we should ignore debug stmts when doing so, e.g. by not pushing
    them to uses.
    That would be a 2 liner change, but while looking at it, I'm also worried
    about VEC_COND_EXPRs that would use the lhs in more than one operand,
    like VEC_COND_EXPR <lhs, lhs, something> or VEC_COND_EXPR <lhs, something,
lhs>
    (sure, they ought to be folded, but what if they weren't).  Because if
    something like that happens, then FOR_EACH_IMM_USE_FAST would push the same
    stmt multiple times and expand_vector_condition can return true even when
    it modifies it (for vector bool masking).
    And lastly, it seems quite wasteful to safe_push statements that will just
    cause vec_cond_expr_only = false; and break; in the second loop, both for
    cases like 1000 immediate non-VEC_COND_EXPR uses and for cases like
    999 VEC_COND_EXPRs with lhs in cond followed by a single non-VEC_COND_EXPR
    use.  So this patch only pushes VEC_COND_EXPRs there.

    2022-02-01  Jakub Jelinek  <jakub@redhat.com>

            PR middle-end/104307
            * tree-vect-generic.c (expand_vector_comparison): Don't push debug
            stmts to uses vector, just set vec_cond_expr_only to false for
            non-VEC_COND_EXPRs instead of pushing them into uses.  Treat
            VEC_COND_EXPRs that use lhs not just in rhs1, but rhs2 or rhs3 too
            like non-VEC_COND_EXPRs.

            * gcc.target/i386/pr104307.c: New test.

    (cherry picked from commit e9bf6d6b0e1d67df6dcee042fbe37ab72c3a38d7)

  parent reply	other threads:[~2022-02-19  8:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-31 14:37 [Bug target/104307] New: [11/12 " asolokha at gmx dot com
2022-01-31 14:38 ` [Bug target/104307] " asolokha at gmx dot com
2022-01-31 16:34 ` jakub at gcc dot gnu.org
2022-01-31 16:43 ` [Bug middle-end/104307] " jakub at gcc dot gnu.org
2022-01-31 16:53 ` jakub at gcc dot gnu.org
2022-02-01 15:06 ` [Bug tree-optimization/104307] " cvs-commit at gcc dot gnu.org
2022-02-01 15:10 ` [Bug tree-optimization/104307] [11 " jakub at gcc dot gnu.org
2022-02-19  8:02 ` cvs-commit at gcc dot gnu.org [this message]
2022-02-19  8:08 ` 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-104307-4-ftmIGkOkos@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).