]> git.ipfire.org Git - thirdparty/gcc.git/commit
AVR: target/121794 - Invoke zero_reg less.
authorGeorg-Johann Lay <avr@gjlay.de>
Thu, 4 Sep 2025 20:03:31 +0000 (22:03 +0200)
committerGeorg-Johann Lay <avr@gjlay.de>
Fri, 5 Sep 2025 12:38:31 +0000 (14:38 +0200)
commite3d14112b266479da9f8fd9c304e0ae15bf0ad25
tree09a38d9c0290e01a41d18af5da66ca3701876f71
parent2965a67c7ef34de74904b600a3e4a4cc858ea37b
AVR: target/121794 - Invoke zero_reg less.

There are some cases where involing zero_reg is not needed and
where there are other sequences with the same efficiency.
An example is to use SBCI R,0 instead of SBC R,__zero_reg__
when R >= R16.  This may turn out to be better for small ISRs.

PR target/121794
gcc/
* config/avr/avr.cc (avr_out_compare): Only use zero_reg
when there is no other sequence of the same length.
(avr_out_plus_ext): Same.
(avr_out_plus_1): Same.
gcc/config/avr/avr.cc