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 rtl-optimization/65651] Redundant cmp with zero instruction in loop for x86 target. Date: Wed, 01 Apr 2015 13:10:00 -0000 [thread overview] Message-ID: <bug-65651-4-UsO8OsBQuF@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-65651-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65651 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org, | |uros at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Well, there is a significant difference between the two testcases, one uses the result of the comparison just in == 0 test, thus CCZmode is appropriate, the other uses it in two comparisons, one == 0 test and one < 0 test. For combine to match *sub<mode>_2 insn, it has to match ix86_match_ccmode (insn, CCGOCmode) where CCGOCmode stands for: Add CCGOC to indicate comparisons against zero that allows unspecified garbage in the Carry and Overflow flag. This mode is used to simulate comparisons of (a-b) and (a+b) against zero using sub/cmp/add operations. But the jle instruction tests ZF || SF <> OF and thus it isn't appropriate. So the question is if the CCGOC test isn't too restrictive, say if CCGCmode would be sufficient (but then we'd still need to arrange for the CCGCmode to be used, rather than CCmode), or if the optimization you are looking for is simply not possible.
next prev parent reply other threads:[~2015-04-01 13:10 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-04-01 12:33 [Bug rtl-optimization/65651] New: " ysrumyan at gmail dot com 2015-04-01 12:35 ` [Bug rtl-optimization/65651] " ysrumyan at gmail dot com 2015-04-01 12:36 ` ysrumyan at gmail dot com 2015-04-01 13:10 ` jakub at gcc dot gnu.org [this message] 2015-04-01 13:45 ` ysrumyan at gmail dot com 2022-01-10 0:08 ` [Bug target/65651] " 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-65651-4-UsO8OsBQuF@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).