aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/openbsd-rust.cc
diff options
context:
space:
mode:
authorGeorg-Johann Lay <avr@gjlay.de>2025-01-22 21:11:22 +0100
committerGeorg-Johann Lay <avr@gjlay.de>2025-01-23 10:13:42 +0100
commitf30edd17e62e9474f90785a5915959cd6d8c3f62 (patch)
treeb9fe8cf33cbb603a2b19b7b7beca1702d204e187 /gcc/config/openbsd-rust.cc
parentb3f51ea894947e495baffc67407647a3b25acdd5 (diff)
downloadgcc-f30edd17e62e9474f90785a5915959cd6d8c3f62.zip
gcc-f30edd17e62e9474f90785a5915959cd6d8c3f62.tar.gz
gcc-f30edd17e62e9474f90785a5915959cd6d8c3f62.tar.bz2
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.
Diffstat (limited to 'gcc/config/openbsd-rust.cc')
0 files changed, 0 insertions, 0 deletions