------- 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

Reply via email to