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/101642] [12 Regression] ice in decompose, at wide-int.h:984 Date: Mon, 02 Aug 2021 12:31:10 +0000 [thread overview] Message-ID: <bug-101642-4-LXwoaOHwKx@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-101642-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101642 --- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Roger Sayle <sayle@gcc.gnu.org>: https://gcc.gnu.org/g:f9fcf754825a1e01033336f84c18690aaa971a6f commit r12-2657-gf9fcf754825a1e01033336f84c18690aaa971a6f Author: Roger Sayle <roger@nextmovesoftware.com> Date: Mon Aug 2 13:27:53 2021 +0100 Optimize x ? bswap(x) : 0 in tree-ssa-phiopt Many thanks again to Jakub Jelinek for a speedy fix for PR 101642. Interestingly, that test case "bswap16(x) ? : x" also reveals a missed optimization opportunity. The resulting "x ? bswap(x) : 0" can be further simplified to just bswap(x). Conveniently, tree-ssa-phiopt.c already recognizes/optimizes the related "x ? popcount(x) : 0", so this patch simply makes that transformation make general, additionally handling bswap, parity, ffs and clrsb. All of the required infrastructure is already present thanks to Jakub previously adding support for clz/ctz. To reflect this generalization, the name of the function is changed from cond_removal_in_popcount_clz_ctz_pattern to the hopefully equally descriptive cond_removal_in_builtin_zero_pattern. 2021-08-02 Roger Sayle <roger@nextmovesoftware.com> gcc/ChangeLog * tree-ssa-phiopt.c (cond_removal_in_builtin_zero_pattern): Renamed from cond_removal_in_popcount_clz_ctz_pattern. Add support for BSWAP, FFS, PARITY and CLRSB builtins. (tree_ssa_phiop_worker): Update call to function above. gcc/testsuite/ChangeLog * gcc.dg/tree-ssa/phi-opt-25.c: New test case.
prev parent reply other threads:[~2021-08-02 12:31 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-27 12:08 [Bug c/101642] New: " dcb314 at hotmail dot com 2021-07-27 12:13 ` [Bug c/101642] " dcb314 at hotmail dot com 2021-07-27 12:21 ` dcb314 at hotmail dot com 2021-07-27 12:24 ` dcb314 at hotmail dot com 2021-07-27 12:43 ` dcb314 at hotmail dot com 2021-07-27 12:43 ` jakub at gcc dot gnu.org 2021-07-27 12:50 ` [Bug middle-end/101642] [12 Regression] " rguenth at gcc dot gnu.org 2021-07-27 12:55 ` zsojka at seznam dot cz 2021-07-27 14:11 ` jakub at gcc dot gnu.org 2021-07-27 14:15 ` zsojka at seznam dot cz 2021-07-27 14:17 ` jakub at gcc dot gnu.org 2021-07-27 14:50 ` jakub at gcc dot gnu.org 2021-07-27 15:08 ` roger at nextmovesoftware dot com 2021-07-28 16:42 ` cvs-commit at gcc dot gnu.org 2021-07-28 16:46 ` jakub at gcc dot gnu.org 2021-08-02 12:31 ` cvs-commit at gcc dot gnu.org [this message]
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-101642-4-LXwoaOHwKx@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: linkBe 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).