Re: [patch,avr] ad PR117726: Tweak 32-bit logical shifts of 25...30 for -Oz

2025-01-22 Thread Denis Chertykov
ср, 22 янв. 2025 г. в 23:53, Georg-Johann Lay : > > As it turns out, logical 32-bit shifts with an offset of 25..30 can > be performed in 7 instructions or less. This beats the 7 instruc- > tions required for the default code of a shift loop. > Plus, with zero overhead, these cases can be 3-operan

[patch,avr] ad PR117726: Tweak 32-bit logical shifts of 25...30 for -Oz

2025-01-22 Thread Georg-Johann Lay
As it turns out, logical 32-bit shifts with an offset of 25..30 can be performed in 7 instructions or less. This beats the 7 instruc- tions required for the default code of a shift loop. Plus, with zero overhead, these cases can be 3-operand. This is only relevant for -Oz because with -Os, 3op s