-
- Downloads
AVR: PR117726 - Tweak 32-bit logical shifts of 25...30 for -Oz.
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 shifts are split with -msplit-bit-shift (which is not performed with -Oz). PR target/117726 gcc/ * config/avr/avr.cc (avr_ld_regno_p): New function. (ashlsi3_out) [case 25,26,27,28,29,30]: Handle and tweak. (lshrsi3_out): Same. (avr_rtx_costs_1) [SImode, ASHIFT, LSHIFTRT]: Adjust costs. * config/avr/avr.md (ashlsi3, *ashlsi3, *ashlsi3_const): Add "r,r,C4L" alternative. (lshrsi3, *lshrsi3, *lshrsi3_const): Add "r,r,C4R" alternative. * config/avr/constraints.md (C4R, C4L): New, gcc/testsuite/ * gcc.target/avr/torture/avr-torture.exp (AVR_TORTURE_OPTIONS): Turn one option variant into -Oz.
Showing
- gcc/config/avr/avr.cc 146 additions, 17 deletionsgcc/config/avr/avr.cc
- gcc/config/avr/avr.md 20 additions, 20 deletionsgcc/config/avr/avr.md
- gcc/config/avr/constraints.md 9 additions, 0 deletionsgcc/config/avr/constraints.md
- gcc/testsuite/gcc.target/avr/torture/avr-torture.exp 1 addition, 1 deletiongcc/testsuite/gcc.target/avr/torture/avr-torture.exp
Loading
Please register or sign in to comment