Bug 50446 - [avr] Implement rotate patterns with offset 1
Summary: [avr] Implement rotate patterns with offset 1
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.6.1
: P4 enhancement
Target Milestone: 4.7.0
Assignee: Not yet assigned to anyone
URL:
Keywords: missed-optimization
Depends on:
Blocks:
 
Reported: 2011-09-18 12:33 UTC by Georg-Johann Lay
Modified: 2011-09-23 10:17 UTC (History)
1 user (show)

See Also:
Host:
Target: avr
Build:
Known to work:
Known to fail: 4.6.1
Last reconfirmed: 2011-09-18 00:00:00


Attachments
rotate.c (398 bytes, text/plain)
2011-09-18 12:36 UTC, Georg-Johann Lay
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Georg-Johann Lay 2011-09-18 12:33:48 UTC
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.
Comment 1 Georg-Johann Lay 2011-09-18 12:36:59 UTC
Created attachment 25310 [details]
rotate.c

Some test cases
Comment 2 Georg-Johann Lay 2011-09-23 10:14:26 UTC
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
Comment 3 Georg-Johann Lay 2011-09-23 10:17:11 UTC
Closed for 4.7 milestone.