https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212
--- Comment #81 from Oleg Endo <olegendo at gcc dot gnu.org> --- (In reply to Kazumoto Kojima from comment #80) > (In reply to Oleg Endo from comment #79) > > Hm, maybe it's better to name this "legitimize_address_displacement" or > > "legitimize_address_offset"? > > Sure. I'm not sure whether that targetm function is a good idea > or not in the first place, though. I haven't studied the LRA code, but I guess there must be some logic that replaces the target hook function sh_legitimize_reload_address. Either it's using sh_legitimize_address and interpreting/expecting something different from what it gets, or it's doing it's own "guessing" of how to legitimize the address. My opinion is that it's better to have an explicit transformation in the back end (i.e. something like legitimize_address_offset) rather than guess-and-check-if-valid. But that's just my personal opinion.