diff options
author | Georg-Johann Lay <avr@gjlay.de> | 2024-07-04 12:08:34 +0200 |
---|---|---|
committer | Georg-Johann Lay <avr@gjlay.de> | 2024-07-17 17:37:10 +0200 |
commit | e21fef7da92ef36af1e1b020ae5f35ef4f3c3fce (patch) | |
tree | bbfff4188064bf584d89d6ef0d6ebd1497202827 /libbacktrace/print.c | |
parent | 5104fe4c7808a66ed3041a8da8e4720585cc8a1f (diff) | |
download | gcc-e21fef7da92ef36af1e1b020ae5f35ef4f3c3fce.zip gcc-e21fef7da92ef36af1e1b020ae5f35ef4f3c3fce.tar.gz gcc-e21fef7da92ef36af1e1b020ae5f35ef4f3c3fce.tar.bz2 |
AVR: target/90616 - Improve adding constants that are 0 mod 256.
This patch introduces a new insn that works as an insn combine
pattern for
(plus:HI (zero_extend:HI (reg:QI))
(const_0mod256_operannd:HI))
which requires at most 2 instructions. When the input register operand
is already in HImode, the addhi3 printer only adds the hi8 part when
it sees a SYMBOL_REF or CONST aligned to at least 256 bytes.
(The CONST_INT case was already handled).
gcc/
PR target/90616
* config/avr/predicates.md (const_0mod256_operand): New predicate.
* config/avr/constraints.md (Cp8): New constraint.
* config/avr/avr.md (*aligned_add_symbol): New insn.
* config/avr/avr.cc (avr_out_plus_symbol) [HImode]:
When op2 is a multiple of 256, there is no need to add / subtract
the lo8 part.
(avr_rtx_costs_1) [PLUS && HImode]: Return expected costs for
new insn *aligned_add_symbol as it applies.
Diffstat (limited to 'libbacktrace/print.c')
0 files changed, 0 insertions, 0 deletions