This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/29294] 4.1, 4.2 (possibly 4.0?) not finding postmodify address mode on ARM
- From: "ramana dot radhakrishnan at codito dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Oct 2006 16:33:25 -0000
- Subject: [Bug rtl-optimization/29294] 4.1, 4.2 (possibly 4.0?) not finding postmodify address mode on ARM
- References: <bug-29294-9933@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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