xtensa: Eliminate unwanted reg-reg moves during DFmode input reloads
commitcfad4856fa46abc878934a9433d0bfc2482ccf00
authorTakayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>
Tue, 14 Jun 2022 03:39:49 +0000 (14 12:39 +0900)
committerMax Filippov <jcmvbkbc@gmail.com>
Wed, 15 Jun 2022 23:55:36 +0000 (15 16:55 -0700)
treecb637df127a7f8a5cc60b7618c34921650db7411
parentc95e307e3a978166cd5d6817ec9d8293825ff3fb
xtensa: Eliminate unwanted reg-reg moves during DFmode input reloads

When spilled DFmode registers are reloaded in, once loaded into a pair of
SImode regs and then copied from that regs.  Such unwanted reg-reg moves
seems not to be eliminated at the "cprop_hardreg" stage, despite no problem
in output reloads.

Luckily it is easy to resolve such inefficiencies, with the use of peephole2
pattern.

gcc/ChangeLog:

* config/xtensa/predicates.md (reload_operand):
New predicate.
* config/xtensa/xtensa.md: New peephole2 pattern.
gcc/config/xtensa/predicates.md
gcc/config/xtensa/xtensa.md