]> git.ipfire.org Git - thirdparty/gcc.git/commit
AVR: Add an RTL peephole to tweak lower_reg:QI o= cst.
authorGeorg-Johann Lay <avr@gjlay.de>
Wed, 6 Nov 2024 08:46:40 +0000 (09:46 +0100)
committerGeorg-Johann Lay <avr@gjlay.de>
Sat, 16 Nov 2024 18:49:34 +0000 (19:49 +0100)
commitbbfba1cc925d7b90d9f501d237fbe10631dbd6d1
tree6285eb5971d57565a17e6ef7dfd5d5d8df7938da
parente30bc91e96f710cb1a15a32c4c53ddfb40f0f282
AVR: Add an RTL peephole to tweak lower_reg:QI o= cst.

For operations like  X o= CST, regalloc may spill l-reg X to a d-reg:
   D =  X
   D o= CST
   X =  D
where it is better to instead
   D =  CST
   X o= D
This patch adds an according RTL peephole.

gcc/
* config/avr/avr.md: Add a peephole2 that improves bit operations
with a lower register and a constant.
gcc/config/avr/avr.md