GCC tries rotate patterns, e.g. I see combiner try to match against rotate. Rotate by one is easy to implement on AVR, so add these patterns/insns.
Created attachment 25310 [details] rotate.c Some test cases
Author: gjl Date: Fri Sep 23 10:14:23 2011 New Revision: 179116 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179116 Log: PR target/50446 * config/avr/avr.md (rotlqi3): Support all offsets 0..7. (rotlqi3_4): Turn insn into expander. (*rotlqi3): New insn. (rotlhi3, rotlsi3): Support rotate left/right by 1. (*rotlhi2.1, *rotlhi2.15): New insns. (*rotlsi2.1, *rotlsi2.31): New insns. * config/avr/constraints.md (C03, C05, C06, C07): New constraints. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr.md trunk/gcc/config/avr/constraints.md
Closed for 4.7 milestone.