On 1/21/2022 9:52 AM, Andreas Krebbel via Gcc-patches wrote:
When propagating a multi-word register into an access with a smaller
mode the can_change_mode backend hook is already consulted for the
original register.  This however is also required for the intermediate
copy in copy_regno which might use a different register class.

Bootstrapped on x86_64 and s390x. No testsuite regressions.

Ok for mainline?

gcc/ChangeLog:

        PR rtl-optimization/101260
        * regcprop.cc (maybe_mode_change): Invoke mode_change_ok also for
        copy_regno.
I'd been sitting on Stefan's patch because it just didn't feel right, but I also knew I'd need to dig further into it to either resolve my concerns or be able to express them clearly to Stefan.

I like this patch much better :-)  OK for the trunk.  Bonus points if you pick up Stefan's testcase from way back in October.

Jeff

Reply via email to