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

--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Stafford Horne from comment #6)
> (In reply to H.J. Lu from comment #5)
> > Created attachment 64924 [details]
> > A patch
> > 
> > Try this.
> 
> This works, I was also investigating this and considered doing a patch like
> this.  But started to look at another approach.  Perhaps we can:
> 
>   1. Remove the previous patches that allow referencing SR[f] in SImode;
> which is causing these invalid sequences to be generated.
>   2. Introduce the right conditions to avoid ifcvt from generating the ICE
> during the conditional_move optimizations.
> 
> Note ifcvt (PR 125155 case) doesn't fail if we compile with flag '-mcmov'
> which enables conditions_move instructions.
> 
> What do you think?  I will spend a bit of time figuring out if this is
> possible.  But if it's too much trouble I would like to go with your patch.
> 
> Thanks for the help.

It will be great if you can revert both

commit c0694f95f591ee49dd0fc3d3bef4765bf36ab5a4
Author: Stafford Horne <[email protected]>
Date:   Sat Jun 7 14:46:30 2025 +0100

    or1k: Fix ICE in libgcc caused by recent validate_subreg changes

and

commit 710581c80b2fd39fa7a8674eccf7dca8cbc7c9c0
Author: H.J. Lu <[email protected]>
Date:   Mon May 4 05:08:51 2026 +0800

    or1k: Allow SImode for condition flag register

while keeping tests.

Reply via email to