]> git.ipfire.org Git - thirdparty/gcc.git/commit
SH: try to workaround fp-reg related move insns
authorKaz Kojima <kkojima@rr.iij4u.or.jp>
Fri, 20 Sep 2024 09:17:31 +0000 (18:17 +0900)
committerOleg Endo <olegendo@gcc.gnu.org>
Wed, 25 Sep 2024 01:01:01 +0000 (10:01 +0900)
commitb924a79f5d3a8d32e4e65e62b63dc4432076af1d
tree3f93d00e9a010207ada1356954082a29be5d5176
parent8ee643e50957904d75affece056a6dd84de343d6
SH: try to workaround fp-reg related move insns

LRA will try to satisfy the constraints in match_scratch for the memory
displacements and it will make issues on this target. To mitigate the
issue, split movsf_ie_ra into several new patterns to remove
match_scratch.  Also define a new sub-pattern of movdf for constant
loads.

gcc/ChangeLog:
* gcc/config/sh/predicates.md (pc_relative_load_operand):
New predicate.
* gcc/config/sh/sh-protos.h (sh_movsf_ie_ra_split_p): Remove.
(sh_movsf_ie_y_split_p): New proto.
* gcc/config/sh/sh.cc: (sh_movsf_ie_ra_split_p): Remove.
(sh_movsf_ie_y_split_p): New function.
(broken_move): Take movsf_ie_ra into account for fldi cases.
* gcc/config/sh/sh.md (movdf_i4_F_z): New insn pattern.
(movdf): Use it.
(movsf_ie_ra): Use define_insn instead of define_insn_and_split.
(movsf_ie_F_z, movsf_ie_Q_z, movsf_ie_y): New insn pattern.
(movsf): Use new patterns.
(movsf-1):  Don't split when operands[0] or operands[1]
is fpul.
(movdf_i4_F_z+7): New splitter.
gcc/config/sh/predicates.md
gcc/config/sh/sh-protos.h
gcc/config/sh/sh.cc
gcc/config/sh/sh.md