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/111913] [14 Regression] ICE with __builtin_popcount(X) + __builtin_popcount(Y) simplification
Date: Tue, 24 Oct 2023 11:16:36 +0000	[thread overview]
Message-ID: <bug-111913-4-1JIVOdkhsM@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-111913-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from CVS 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:452c4f32373feb6b2c1c1d91b5ec6fe7e7ce0000

commit r14-4888-g452c4f32373feb6b2c1c1d91b5ec6fe7e7ce0000
Author: Andrew Pinski <pinskia@gmail.com>
Date:   Mon Oct 23 12:46:34 2023 -0700

    match: Fix the `popcnt(a&b) + popcnt(a|b)` pattern for types [PR111913]

    So this pattern needs a little help on the gimple side of things to know
what
    the type popcount should be. For most builtins, the type is the same as the
input
    but popcount and others are not. And when using it with another outer
expression,
    genmatch needs some slight help to know that the return type was type
rather than
    the argument type.

    Bootstrapped and tested on x86_64-linux-gnu with no regressions.

            PR tree-optimization/111913

    gcc/ChangeLog:

            * match.pd (`popcount(X&Y) + popcount(X|Y)`): Add the resulting
            type for popcount.

    gcc/testsuite/ChangeLog:

            * gcc.c-torture/compile/fold-popcount-1.c: New test.
            * gcc.dg/fold-popcount-8a.c: New test.

  parent reply	other threads:[~2023-10-24 11:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-22  2:09 [Bug c/111913] New: GCC: 14: -O1 compile __builtin_popcount fails while -O0 succeeds 141242068 at smail dot nju.edu.cn
2023-10-22  2:41 ` [Bug tree-optimization/111913] [14 Regression] ICE with __builtin_popcount(X) + __builtin_popcount(Y) simplification pinskia at gcc dot gnu.org
2023-10-23  9:16 ` rguenth at gcc dot gnu.org
2023-10-23 18:58 ` pinskia at gcc dot gnu.org
2023-10-23 19:40 ` pinskia at gcc dot gnu.org
2023-10-23 19:41 ` pinskia at gcc dot gnu.org
2023-10-23 19:43 ` pinskia at gcc dot gnu.org
2023-10-23 23:05 ` pinskia at gcc dot gnu.org
2023-10-24 11:16 ` cvs-commit at gcc dot gnu.org [this message]
2023-10-24 11:17 ` 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-111913-4-1JIVOdkhsM@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).