]> git.ipfire.org Git - thirdparty/gcc.git/commit
or1k: Fix ICE in libgcc caused by recent validate_subreg changes
authorStafford Horne <shorne@gmail.com>
Sat, 7 Jun 2025 13:46:30 +0000 (14:46 +0100)
committerStafford Horne <shorne@gmail.com>
Thu, 12 Jun 2025 16:21:07 +0000 (17:21 +0100)
commitc0694f95f591ee49dd0fc3d3bef4765bf36ab5a4
tree83b98ec374fa53b4044abac1fb370b6b285030cd
parent8fa1e98493def5eb327397a587aa846f2145d634
or1k: Fix ICE in libgcc caused by recent validate_subreg changes

After commit eb2ea476db2 ("emit-rtl: Allow extra checks for
paradoxical subregs [PR119966]") paradoxical subregs or the OpenRISC
condition flag register (reg:BI sr_f) are no longer allowed.

This causes and ICE in the ce1 pass which tries to get the or1k flag
register into an SI register, which is no longer possible.

Adjust or1k_can_change_mode_class to allow changing the or1k flag reg to
SI mode which in turn allows paradoxical subregs to be generated again.

gcc/ChangeLog:

PR target/120587
* config/or1k/or1k.cc (or1k_can_change_mode_class): Allow
changing flags mode from BI to SI to allow for paradoxical
subregs.
gcc/config/or1k/or1k.cc