[Bug rtl-optimization/92176] LRA problem with reloads for subreg operands
vmakarov at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Dec 2 20:31:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92176
--- Comment #5 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to Andreas Krebbel from comment #3)
> 276.ira:
>
....
>
> /* Give the backend a chance to disallow the mode change. */
> if (GET_MODE_CLASS (xmode) != MODE_COMPLEX_INT
> && GET_MODE_CLASS (xmode) != MODE_COMPLEX_FLOAT
> && !REG_CAN_CHANGE_MODE_P (xregno, xmode, ymode)
> /* We can use mode change in LRA for some transformations. */
> && ! lra_in_progress) <----- ?
> return -1;
>
> I'm currently checking whether removing it makes any difference in code
> generation - apart from fixing the testcase.
As I remember this is necessary for some x86/x86-64 insn descriptions which
match operands of different modes one of which is XFmode. For matched reloads
LRA uses one pseudo and that creates incorrect RTL.
So I think just removing this code will not work for all targets. We should
probably somewhere check XFmode or introduce a machine-dependent hook.
I'll investigate this problem more.
More information about the Gcc-bugs
mailing list