[AVR] Optimize 32-bit shifts: reverse shift + move
authorAyke van Laethem <aykevanlaethem@gmail.com>
Tue, 6 Dec 2022 13:39:37 +0000 (14:39 +0100)
committerAyke van Laethem <aykevanlaethem@gmail.com>
Sun, 8 Jan 2023 19:05:31 +0000 (20:05 +0100)
commitfad5e0cf50f119f083dfc82e08994825cae5001f
treebb9a79771e3facb388af0340bdb511345b16094f
parent81f5f22f27847b9adc69485aff4a36af205c0549
[AVR] Optimize 32-bit shifts: reverse shift + move

This optimization turns shifts of almost a multiple of 8 into a shift
into the opposite direction. Unfortunately it doesn't compose well with
the other optimizations (I've tried) so it's separate from them.

Differential Revision: https://reviews.llvm.org/D140572
llvm/lib/Target/AVR/AVRISelLowering.cpp
llvm/test/CodeGen/AVR/shift32.ll