public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ramana dot radhakrishnan at codito dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/29294] 4.1, 4.2 (possibly 4.0?) not finding postmodify address mode on ARM
Date: Mon, 09 Oct 2006 16:33:00 -0000	[thread overview]
Message-ID: <20061009163325.20894.qmail@sourceware.org> (raw)
In-Reply-To: <bug-29294-9933@http.gcc.gnu.org/bugzilla/>



------- Comment #7 from ramana dot radhakrishnan at codito dot com  2006-10-09 16:33 -------
(In reply to comment #5)

flow.c is responsible for generating POST_INCs and POST_MODIFY's in 3.4 / 4.0 /
4.1 / 4.2 . I believe this is being replaced by the new data flow bits in the
data flow branch. This might not be ready until 4.3 . We have hit similar
issues in a private port that I maintain. 

2 options are either to fix flow.c or use some of Joern's auto increment
patches for 4.1 / 4.2 to fix this issue. This doesn't really take care of
POST_MODIFY but I don't think that affects ARM that much. 


> Here's what's going on in this case:
> 
> CSE changes an address if:
>    A) The cost of the address is lower
> or
>    B) The cost of the address is the same and the cost of the RTX would be 
>       higher outside of an address
> 
> So, CSE changes (R) to (R+4) because it is lower cost as specified by the 
> address_costs hook.
> 
> It doesn't change beyond (R+4) because (R+8) is the same cost as (R+4).
> 
> Once the address (R+4) gets in the RTL sequence, it never gets converted to 
> a postincrement form.
> 
> So by adding the cost of a simple REG RTX as being lower than (+ (REG) (CONST)) 
> in the addressing modes, CSE doesn't convert the address to base+offset, and
> we get the postincrement code back again in 4.x.
> 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29294


  parent reply	other threads:[~2006-10-09 16:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-29 23:37 [Bug tree-optimization/29294] New: " eplondke at gmail dot com
2006-09-29 23:38 ` [Bug tree-optimization/29294] " eplondke at gmail dot com
2006-09-29 23:42 ` [Bug rtl-optimization/29294] " eplondke at gmail dot com
2006-09-29 23:43 ` pinskia at gcc dot gnu dot org
2006-10-02 19:16 ` eplondke at gmail dot com
2006-10-06 14:56 ` eplondke at gmail dot com
2006-10-06 19:07 ` eplondke at gmail dot com
2006-10-09 16:33 ` ramana dot radhakrishnan at codito dot com [this message]
2009-04-21 14:09 ` ramana at gcc dot gnu dot org
2009-12-14 23:22 ` rearnsha at gcc dot gnu dot org
     [not found] <bug-29294-4@http.gcc.gnu.org/bugzilla/>
2012-12-20  4:45 ` siarhei.siamashka at gmail dot com
2012-12-20  5:47 ` siarhei.siamashka 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=20061009163325.20894.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).