]> git.ipfire.org Git - thirdparty/gcc.git/commit
AVR: target/120856 - Deny R24:DI in avr_hard_regno_mode_ok with Reload.
authorGeorg-Johann Lay <avr@gjlay.de>
Sat, 28 Jun 2025 14:22:50 +0000 (16:22 +0200)
committerGeorg-Johann Lay <avr@gjlay.de>
Sat, 28 Jun 2025 14:40:18 +0000 (16:40 +0200)
commit13390e1b65f499ba33b7b5ff76bd9936e81b74e4
treeb68fe0f4b610063cee47491e1346108de4437c06
parente7fb2459b00cde4fb14062076df29320efafdb98
AVR: target/120856 - Deny R24:DI in avr_hard_regno_mode_ok with Reload.

This fixes an ICE with -mno-lra when split2 tries to split the following
zero_extendsidi2 insn:

   (set (reg:DI 24)
        (zero_extend:DI (reg:SI **)))

The ICE is because avr_hard_regno_mode_ok allows R24:DI but disallows
R28:SI when Reload is used.  R28:SI is a result of zero_extendsidi2.

This ICE only occurs with Reload (which will die before very long),
but it occurs when building libgcc.

gcc/
PR target/120856
* config/avr/avr.cc (avr_hard_regno_mode_ok) [-mno-lra]: Deny
hard regs >= 4 bytes that overlap Y.
gcc/config/avr/avr.cc