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/107342] Optimization opportunity where integer '/' corresponds to '>>' Date: Fri, 04 Nov 2022 14:18:43 +0000 [thread overview] Message-ID: <bug-107342-4-yPoXoTfsXw@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-107342-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107342 --- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Aldy Hernandez <aldyh@gcc.gnu.org>: https://gcc.gnu.org/g:679be32e66428f0ba81d1c1b55f7bd47f01cb295 commit r13-3688-g679be32e66428f0ba81d1c1b55f7bd47f01cb295 Author: Aldy Hernandez <aldyh@redhat.com> Date: Fri Nov 4 10:20:46 2022 +0100 Set nonzero bits for multiplication and divisions by a power of 2. We're missing a lot of TLC in keeping track of nonzero bits across range-ops. It isn't an oversight, but just limited amount of hours to implement stuff. This patch keeps better track of the nonzero mask (really maybe_nonzero bits as discussed) across multiplication and division when the RHS is a power of 2. It fixes PR107342 and also touches on PR55157. In the latter, the nonzero mask is being set quite late (CCP2) but could be set by evrp time if we enhanced range-ops. I have added tests from both PRs. Tested PR tree-optimization/107342 gcc/ChangeLog: * range-op.cc (operator_mult::fold_range): New. (operator_div::fold_range): New. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/vrp122.c: New test. * gcc.dg/tree-ssa/vrp123.c: New test.
next prev parent reply other threads:[~2022-11-04 14:18 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-10-21 8:36 [Bug tree-optimization/107342] New: " tschwinge at gcc dot gnu.org 2022-10-21 19:04 ` [Bug tree-optimization/107342] " aldyh at gcc dot gnu.org 2022-10-21 19:10 ` aldyh at gcc dot gnu.org 2022-10-22 18:01 ` aldyh at gcc dot gnu.org 2022-11-04 14:18 ` cvs-commit at gcc dot gnu.org [this message] 2022-11-04 14:20 ` aldyh at gcc dot gnu.org 2022-11-28 22:13 ` 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-107342-4-yPoXoTfsXw@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).