public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug testsuite/109147] New: Missing IPA-VRP for return values Date: Wed, 15 Mar 2023 17:01:18 +0000 [thread overview] Message-ID: <bug-109147-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109147 Bug ID: 109147 Summary: Missing IPA-VRP for return values Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: testsuite Assignee: unassigned at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org CC: david.spickett at linaro dot org, unassigned at gcc dot gnu.org Depends on: 109146 Target Milestone: --- +++ This bug was initially created as a clone of Bug #109146 +++ I guess we should turn this primarily into an enhancement request to optimize this. I believe that is a request for return value ranges in IPA-VRP. So a testcase could be: __attribute__((noinline)) static int foo (int a, int b) { return a == b; } int bar (int a, int b) { return foo (a, b) != 0; } __attribute__((noinline)) static int baz (int a) { if (a > 10 || a < -10) return 0; return a; } int qux (int a) { return baz (a) == 42; } where if we determine that foo always returns [0, 1] and baz [-10, 10], then we can optimize that return ret != 0; into return ret; and ret == 42 into 0. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109146 [Bug 109146] Tail call prevention in frame-address.c is not correct
next reply other threads:[~2023-03-15 17:01 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-03-15 17:01 jakub at gcc dot gnu.org [this message] 2023-03-15 17:03 ` [Bug testsuite/109147] " pinskia at gcc dot gnu.org 2023-03-15 17:07 ` jakub at gcc dot gnu.org 2023-03-15 17:16 ` jakub at gcc dot gnu.org 2023-03-15 17:16 ` jakub at gcc dot gnu.org 2023-12-06 18:59 ` 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-109147-4@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).