public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "amker.cheng at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/50749] Auto-inc-dec does not find subsequent contiguous mem accesses Date: Mon, 30 Sep 2013 09:06:00 -0000 [thread overview] Message-ID: <bug-50749-4-Dzw5lweGlS@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-50749-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50749 bin.cheng <amker.cheng at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amker.cheng at gmail dot com --- Comment #15 from bin.cheng <amker.cheng at gmail dot com> --- There must be another scenario for the example, and in this case example: int test_0 (char* p, int c) { int r = 0; r += *p++; r += *p++; r += *p++; return r; } should be translated into sth like: //... ldrb [rx] ldrb [rx+1] ldrb [rx+2] add rx, rx, #3 //... This way all loads are independent and can be issued on super scalar machine. Actuall for targets like arm which supports post-increment constant (other than size of memory access), it can be further changed into: //... ldrb [rx], #3 ldrb [rx-2] ldrb [rx-1] //... For now auto-increment pass can't do this optimization. I once have a patch for this but benchmark shows the case is not common. This case is common especially after loop unrolling and rtl passes deliberately break down long dependence of RX, which I think is right.
next prev parent reply other threads:[~2013-09-30 9:06 UTC|newest] Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-10-16 20:29 [Bug target/50749] New: SH Target: Post-increment addressing used only for first memory access oleg.endo@t-online.de 2011-10-16 23:34 ` [Bug target/50749] " kkojima at gcc dot gnu.org 2011-10-17 0:33 ` kkojima at gcc dot gnu.org 2011-10-19 0:00 ` oleg.endo@t-online.de 2011-10-19 21:37 ` kkojima at gcc dot gnu.org 2011-10-30 12:37 ` oleg.endo@t-online.de 2011-10-30 13:54 ` oleg.endo@t-online.de 2011-10-30 23:37 ` kkojima at gcc dot gnu.org 2011-11-28 22:54 ` oleg.endo@t-online.de 2011-11-29 0:25 ` kkojima at gcc dot gnu.org 2011-12-30 2:14 ` oleg.endo@t-online.de 2011-12-30 3:36 ` kkojima at gcc dot gnu.org 2012-06-12 7:10 ` [Bug middle-end/50749] Auto-inc-dec does not find subsequent contiguous mem accesses olegendo at gcc dot gnu.org 2012-08-23 14:17 ` [Bug rtl-optimization/50749] " olegendo at gcc dot gnu.org 2013-06-22 12:22 ` olegendo at gcc dot gnu.org 2013-09-30 9:06 ` amker.cheng at gmail dot com [this message] 2013-10-03 10:47 ` olegendo at gcc dot gnu.org 2013-12-06 20:28 ` olegendo at gcc dot gnu.org 2013-12-24 22:55 ` steven at gcc dot gnu.org 2015-05-22 13:57 ` olegendo at gcc dot gnu.org 2015-09-17 9:00 ` urjaman at gmail dot com 2015-09-17 14:26 ` olegendo at gcc dot gnu.org 2015-09-17 19:45 ` urjaman at gmail dot 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-50749-4-Dzw5lweGlS@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).