]> git.ipfire.org Git - thirdparty/gcc.git/commit
AVR: Allow more combinations of XOR / IOR with byte-shifts.
authorGeorg-Johann Lay <avr@gjlay.de>
Tue, 16 Jul 2024 13:17:23 +0000 (15:17 +0200)
committerGeorg-Johann Lay <avr@gjlay.de>
Tue, 16 Jul 2024 13:20:29 +0000 (15:20 +0200)
commitcca1229b85f2ad9422773fdb954d0924fa1cd350
treeabc75487795c284f9ca272a006dfdced704381f4
parent5e1d530da87a6d2aa7e719744cb278e7e54a6623
AVR: Allow more combinations of XOR / IOR with byte-shifts.

This patch takes some existing patterns that have QImode as one
input and uses a mode iterator to allow for more modes to match.
These insns are split after reload into *xorqi3 resp. *iorqi3 insn(s).

gcc/
* config/avr/avr-protos.h (avr_emit_xior_with_shift): New proto.
* config/avr/avr.cc (avr_emit_xior_with_shift): New function.
* config/avr/avr.md (any_lshift): New code iterator.
(*<xior:code><mode>.<any_lshift:code>): New insn-and-split.
(<code><HISI:mode><QIPSI:mode>.0): Replaces...
(*<code_stdname><mode>qi.byte0): ...this one.
(*<xior:code><HISI:mode><QIPSI:mode>.<any_lshift:code>): Replaces...
(*<code_stdname><mode>qi.byte1-3): ...this one.
gcc/config/avr/avr-protos.h
gcc/config/avr/avr.cc
gcc/config/avr/avr.md