On Aug 15 2024, Jeff Law wrote: > On 8/15/24 2:50 AM, Richard Sandiford wrote: >> The PR points out that, for an address like: >> (plus (zero_extend X) Y) >> decompose_normal_address doesn't establish a strong preference >> between treating X as the base or Y as the base. As the comment >> in the patch says, zero_extend isn't enough on its own to assume >> an index, at least not on POINTERS_EXTEND_UNSIGNED targets. >> But in a construct like the one above, X and Y have different modes, >> and it seems reasonable to assume that the one with the expected >> address mode is the base. >> This matters on targets like m68k that support index extension >> and that require different classes for bases and indices. >> Tested on aarch64-linux-gnu & x86_64-linux-gnu. Andreas also confirms >> that it fixes the m68k LRA problem. OK to install? >> Richard >> gcc/ >> PR middle-end/116236 >> * rtlanal.cc (decompose_normal_address): Try to distinguish >> bases and indices based on mode, before resorting to "baseness". > OK. Thanks to everyone for chasing this down. No idea where we sit with > the conversion of m68k to LRA but this looks like it'd be helpful > irrespective of that effort.
With PR116236 and PR116374 the situation is looking quite well. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."