public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "marc.glisse at normalesup dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/51938] missed optimization: 2 comparisons Date: Thu, 07 Jun 2012 14:54:00 -0000 [thread overview] Message-ID: <bug-51938-4-913ljCGUBp@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-51938-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51938 Marc Glisse <marc.glisse at normalesup dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|rtl-optimization |tree-optimization --- Comment #4 from Marc Glisse <marc.glisse at normalesup dot org> 2012-06-07 14:54:02 UTC --- Changing to tree-optimization (doing the optimization at RTL level would require finite-math-only). There is plenty of code that corresponds to A&&B and A||B, but (almost) nothing for A&&!B. Quite a big missing piece... <bb 2>: if (x_2(D) > 0.0) goto <bb 5>; else goto <bb 3>; <bb 3>: if (x_2(D) < 0.0) goto <bb 4>; else goto <bb 5>; The 2 conditions don't share the same then branch or the same else branch (it is a mix), so ifcombine doesn't even try to turn it into if (x_2(D) > 0.0 || !(x_2(D) < 0.0)) goto <bb 5>; else goto <bb 4>; Besides, it doesn't look like the logic is in place to fold that condition into just its second half (but I may have missed it).
next prev parent reply other threads:[~2012-06-07 14:54 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-01-21 22:54 [Bug tree-optimization/51938] New: " marc.glisse at normalesup dot org 2012-01-23 10:29 ` [Bug rtl-optimization/51938] " rguenth at gcc dot gnu.org 2012-01-23 13:07 ` marc.glisse at normalesup dot org 2012-06-06 21:23 ` glisse at gcc dot gnu.org 2012-06-07 14:54 ` marc.glisse at normalesup dot org [this message] 2012-06-08 13:07 ` [Bug tree-optimization/51938] " glisse at gcc dot gnu.org 2012-06-08 19:49 ` glisse at gcc dot gnu.org 2012-06-08 20:03 ` glisse at gcc dot gnu.org 2012-06-09 21:36 ` glisse at gcc dot gnu.org 2012-08-06 16:39 ` glisse at gcc dot gnu.org 2012-08-06 16:53 ` glisse 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-51938-4-913ljCGUBp@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).