http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52055
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-31 18:29:33 UTC --- Combine can already do this kind of change, as can be seen e.g. on void foo (unsigned long long *p) { asm volatile ("" : : "rm" ((unsigned) *p)); } where combine shortens the load into SImode load, but on this testcase we don't attempt to combine it, because cant_combine_insn_p on the insn with subreg says we shouldn't combine it (the src is a subreg:SI of the reg:DI initialized by the DImode memory load, but dest is hard register %eax, which has likely spilled register class). So, shell we do this kind of shortening in fwprop instead? If a MEM load has all uses subregged to a narrower mode, try to subreg it and adjust the callers?