[Patch, AVR]: Fix PR33049 (implement extzv)

Georg-Johann Lay avr@gjlay.de
Mon Jun 20 18:39:00 GMT 2011

This is an optimization patch that implements extzv for 1-bit extracts.

The nice thing is that AVR can do this easily with a BLD/CLR/BST
sequence, without putting pressure on d-regs and without the
requirement of source being in the same register as destination.

extzv can also be seen in conjunction with zero_extend which, without
this patch, will lead to a 16-bit loop just to get one bit from a
position with a known offset.  So there are two splits to split the
high-part away.

Tested without regression.


	PR target/33049
	* config/avr/avr.md (extzv): New expander.
	(*extzv, *extzv.qihi1, *extzv.qihi2): New insn-and-split.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr33049.diff
Type: text/x-patch
Size: 2929 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110620/337bf230/attachment.bin>

More information about the Gcc-patches mailing list