public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "fxue at os dot amperecomputing.com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/100802] New: VRP fails to fold comparison with known value orders Date: Thu, 27 May 2021 14:56:49 +0000 [thread overview] Message-ID: <bug-100802-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100802 Bug ID: 100802 Summary: VRP fails to fold comparison with known value orders Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- In the case below, it is obvious that we have value orders as i < a <= b inside loop. So "if (i >= b)" could be optimized away, but VRP fails to do that. int f1(); int f2(); int foo (unsigned a, unsigned b) { if (a <= b) { for (unsigned i = 0; i < a; i++) { f1 (); if (i >= b) f2 (); } } return 0; }
next reply other threads:[~2021-05-27 14:56 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-27 14:56 fxue at os dot amperecomputing.com [this message] 2021-11-05 21:40 ` [Bug tree-optimization/100802] VRP fails to fold comparison using " amacleod at redhat dot com 2021-11-16 1:49 ` fxue at os dot amperecomputing.com
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-100802-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).