https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91720
Jim Wilson <wilson at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wilson at gcc dot gnu.org --- Comment #8 from Jim Wilson <wilson at gcc dot gnu.org> --- Created attachment 46867 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46867&action=edit simplest fix: don't define WORD_REGISTER_OPERATIONS I've had problems with combine, LOAD_EXTEND_OP, and WORD_REGISTER_OPERATIONS before. I think combine is making unsafe assumptions in this case, but I'm getting tired of arguing about this. So the simple solution is to just stop defining WORD_REGISTER_OPERATIONS. It makes this testcase work. I get about a 0.1% code size increase when I try it with a 64-bit toolchain, looking at libc and libstdc++ library file sizes. If this affects dhrystone or coremark code size or performance, a lot of people will be unhappy, so I will have to double check that. For a 32-bit toolchain it is more like 0.01% which is not as bad.