Skip to content

[AVR] More shift by compile time constant optimizations

ccrause requested to merge ccrause/fpc-source:2022-03-08-avr-shifts into main

Extra optimizations have been added for shifts with compile time constants. The additional optimizations are discussed here: https://github.com/ccrause/freepascal/wiki/%5BAVR%5D-Optimizing-code-generation-for-shift-with-compile-time-constant#case-3---compact-alternatives-to-certain-shift-operations

Also added test cases for shifts by constant amounts both with and without size optimization, to exercise both paths of the code generator.

Merge request reports