public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "olegendo at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/52898] SH Target: Inefficient DImode comparisons Date: Wed, 11 Apr 2012 22:48:00 -0000 [thread overview] Message-ID: <bug-52898-4-UlKd4RB8we@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-52898-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52898 --- Comment #1 from Oleg Endo <olegendo at gcc dot gnu.org> 2012-04-11 22:48:18 UTC --- Created attachment 27138 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27138 Examples In addition to the original case, I've noticed that there are more weird things happening with DImode comparisons in general. The attached test cases do not cover all the possible combinations, but basically the -mcbranchdi and -mcmpeqdi options in combination with -O2 and -Os seem not to behave as originally intended. With -O2 the cmpeqdi_t pattern is never used no matter which options are specified. I think it is the split below the cmpeqdi_t insn in sh.md, that does this. The code of the cmpeqdi_t insn seems already quite optimal, except that the first cmp / tst insn should be emitted separately to get potentially better scheduling. Moreover, there is an unnamed tstdi_t pattern which never gets used by combine. What happens there, is that the and:DI is split by the middle-end into 2x and:SI at a very early stage. I think this is because there is no and:DI insn defined.
next prev parent reply other threads:[~2012-04-11 22:48 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-04-07 11:18 [Bug target/52898] New: SH Target: Inefficient comparison of DImode and immediate constant olegendo at gcc dot gnu.org 2012-04-11 22:48 ` olegendo at gcc dot gnu.org [this message] 2012-04-11 22:52 ` [Bug target/52898] SH Target: Inefficient DImode comparisons olegendo at gcc dot gnu.org 2012-04-12 1:13 ` kkojima at gcc dot gnu.org 2012-04-12 6:20 ` olegendo at gcc dot gnu.org 2012-04-12 7:00 ` olegendo at gcc dot gnu.org 2012-09-01 22:47 ` olegendo at gcc dot gnu.org 2013-12-07 8:05 ` olegendo at gcc dot gnu.org 2013-12-07 10:36 ` kkojima at gcc dot gnu.org 2013-12-08 22:16 ` olegendo 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-52898-4-UlKd4RB8we@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).