https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66444
--- Comment #7 from vries at gcc dot gnu.org ---
(In reply to Jakub Jelinek from comment #6)
> The 0xe000000000UL constant is probably not very good for ilp32 targets.
> Try some < 4GB one if it still reproduces without the patch, or
> conditionalize it on __SIZEOF_POINTER__.
I've tried with 0xe0000000U. The m64 case still reproduces.
With -m32 -mregparm=1 we get:
...
.cfi_startproc
call bar
sall $4, %eax
leal -536870912(%eax), %edx
movl %edx, %eax
call fn1
movl %edx, %eax
call fn2
xorl %eax, %eax
ret
...
The reload_combine doesn't trigger for this case.