https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118610

--- Comment #7 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to Jeffrey A. Law from comment #4)
> Given the range in question this seems relevant:
> 
> ommit 01339d29b7663d85eea6145eac2b1ad1da428c11
> Author: Vladimir N. Makarov <[email protected]>
> Date:   Tue Jan 28 08:37:33 2025 -0500
> 
>     [PR118663][LRA]: Change secondary memory mode only if there are regs
> holding the changed mode
>     
>       My recent patch for PR118067 changes the secondary memory mode if
>     all regs of the pseudo reg class are prohibited in the secondary mode.
>     But the patch does not check a special case when the
>     corresponding target hook returns this mode although there are no hard
>     regs of pseudo class holding value of the mode at all.  This results
>     in given PR and this patch fixes it.
>     
>     gcc/ChangeLog:
>     
>             PR target/118663
>             * lra-constraints.cc (invalid_mode_reg_p): Check empty
>             reg_class_contents.
>     
>     gcc/testsuite/ChangeLog:
>     
>             PR target/118663
>             * gcc.target/powerpc/pr118663.c: New.
> 
> If it's not that patch them it's most likely just gone latent.

This is exactly the patch which solves the problem.  It changes the mode for
hard reg %f0.  w/o the patch, LRA infinitely generates new reload insns with
the wrong mode.

So commit 07f62ed9a7b09951f83855e19d41641b098190b1 and previous related commit
just triggered a latent bug which was fixed later by
01339d29b7663d85eea6145eac2b1ad1da428c11.

I believe the PR should be closed and there is no sense to port the all
mentioned patches to the branches for releases 14, 13, ...

Reply via email to