public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "steven at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/42612] post-increment addressing not used
Date: Mon, 04 Jan 2010 18:53:00 -0000 [thread overview]
Message-ID: <20100104185314.4874.qmail@sourceware.org> (raw)
In-Reply-To: <bug-42612-10439@http.gcc.gnu.org/bugzilla/>
------- Comment #1 from steven at gcc dot gnu dot org 2010-01-04 18:53 -------
>From the tree optimizers we go to expand with the following code (from
PR42612.c.139t.optimized):
;; Function func (func)
func (char * p)
{
<bb 2>:
*p_1(D) = 0;
p_2 = p_1(D) + 1;
*p_2 = 0;
p_3 = p_2 + 1;
*p_3 = 0;
p_4 = p_3 + 1;
return p_4;
}
The code remains in this form until combine, which changes the code as follows
(left is PR42612.c.174r.dce, right is PR42612.c.175r.combine, dumped with
-fdump-rtl-all-slim):
4 NOTE_INSN_BASIC_BLOCK 4 NOTE_INSN_BASIC_BLOCK
2 r137:SI=r0:SI 2 r137:SI=r0:SI
REG_DEAD: r0:SI REG_DEAD: r0:SI
3 NOTE_INSN_FUNCTION_BEG 3 NOTE_INSN_FUNCTION_BEG
6 r138:SI=0x0 6 r138:SI=0x0
28 r133:SI=r137:SI 28 r133:SI=r137:SI
8 [r133:SI++]=r138:SI#0 8 [r133:SI++]=r138:SI#0
REG_INC: r133:SI REG_INC: r133:SI
REG_EQUAL: 0x0 REG_EQUAL: 0x0
12 [r137:SI+0x1]=r138:SI#0 12 [r137:SI+0x1]=r138:SI#0
REG_DEAD: r137:SI REG_DEAD: r137:SI
REG_EQUAL: 0x0 REG_EQUAL: 0x0
13 r134:SI=r133:SI+0x1 | 13 NOTE_INSN_DELETED
16 [r133:SI+0x1]=r138:SI#0 16 [r133:SI+0x1]=r138:SI#0
REG_DEAD: r138:SI REG_DEAD: r138:SI
REG_DEAD: r133:SI <
REG_EQUAL: 0x0 REG_EQUAL: 0x0
17 r144:SI=r134:SI+0x1 | 17 NOTE_INSN_DELETED
REG_DEAD: r134:SI | 22 r0:SI=r133:SI+0x2
22 r0:SI=r144:SI | REG_DEAD: r133:SI
REG_DEAD: r144:SI <
25 use r0:SI 25 use r0:SI
Paolo, you know combine best. Is there a way, you think, to teach combine about
post-increment addressing?
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bonzini at gnu dot org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-01-04 18:53:12
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42612
next prev parent reply other threads:[~2010-01-04 18:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-04 16:02 [Bug c/42612] New: [4.4/4.5] " jon at beniston dot com
2010-01-04 16:11 ` [Bug rtl-optimization/42612] " rguenth at gcc dot gnu dot org
2010-01-04 18:53 ` steven at gcc dot gnu dot org [this message]
2010-01-05 11:43 ` bonzini at gnu dot org
2010-01-05 12:13 ` jon at beniston dot com
[not found] <bug-42612-4@http.gcc.gnu.org/bugzilla/>
2012-08-23 14:16 ` olegendo at gcc dot gnu.org
2015-05-22 13:57 ` olegendo at gcc dot gnu.org
2022-07-12 5:21 ` bd at mail dot ru
2022-07-12 5:39 ` 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=20100104185314.4874.qmail@sourceware.org \
--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: link
Be 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).