public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/64130] vrp: handle non zero constant divided by range cannot be zero. Date: Mon, 01 Dec 2014 09:30:00 -0000 [thread overview] Message-ID: <bug-64130-4-wkGa2rIUmQ@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-64130-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64130 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Status|UNCONFIRMED |NEW Last reconfirmed| |2014-12-01 Ever confirmed|0 |1 --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Andi Kleen from comment #3) > You're right. I actually meant > > x >= maxval(typeof(a)), x / a cannot be 0. > > Corrected test case (assuming 64bit target): > > #include <limits.h> > > int fsigned(int a) > { > return 0x1fffffffL / a == 0; > } 0x1fffffffL / 0x20000000 == 0 Maybe you meant 0x1fffffffffffffffL / a == 0? > int funsigned(unsigned a) > { > return 0x1fffffffL / a == 0; > } > > >So this should be optimized to a > 100 instead. > > Yes this would make sense too. Yes.
next prev parent reply other threads:[~2014-12-01 9:30 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-11-30 20:40 [Bug tree-optimization/64130] New: " andi-gcc at firstfloor dot org 2014-11-30 20:47 ` [Bug tree-optimization/64130] " glisse at gcc dot gnu.org 2014-11-30 20:49 ` pinskia at gcc dot gnu.org 2014-11-30 20:57 ` andi-gcc at firstfloor dot org 2014-12-01 9:30 ` rguenth at gcc dot gnu.org [this message] 2015-06-18 23:38 ` kugan at gcc dot gnu.org 2015-06-19 7:13 ` pinskia at gcc dot gnu.org 2015-06-19 8:05 ` glisse at gcc dot gnu.org 2015-06-19 11:36 ` kugan at gcc dot gnu.org 2015-06-29 0:16 ` kugan at gcc dot gnu.org 2015-06-29 8:39 ` rguenth 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-64130-4-wkGa2rIUmQ@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).