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.

Reply via email to