This is the mail archive of the egcs@egcs.cygnus.com mailing list for the EGCS project. See the EGCS home page for more information.
Michael Hayes writes: > I've found I can emulate the behaviour of the Sparc by setting > ADDRESS_COST to 1. I then get essentially the same pattern of GIVs > and the GIV combination works well. With the Sparc we get the following expressions which the giv combiner does the right thing: ra = biv * 8 *(ra + rb) *(ra + rc) rd = ra + rb re = ra + rc *(rd + 4) *(re + 4) However, if a reg+reg addressing cost is higher than a reg addressing cost (as on the c4x), CSE turns the above into: ra = biv * 8 rd = ra + rb re = ra + rc *rd *re *(rd + 4) *(re + 4) Unfortunately, giv combination does the wrong thing with this. The upshot is, if the address costs try to discourage reg+reg addressing modes, there is a greater chance of generating them! Michael.