https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212

--- Comment #264 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to Kazumoto Kojima from comment #263)
> Created attachment 59132 [details]
> a patch rewriting movsh_ie_ra
> 
> This patch splits movsf_ie_ra into several new patterns to remove
> match_scratch.  Also define a new sub-pattern of movdf for constant loads.
>     
>     * 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.
>     * 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): Rename from movsf_ie_const_ra.
>     (movsf_ie_Q_z, movsf_ie_y): New insn pattern.
>     (movsf): Use new patterns.
>     (movdf_i4_F_z+7): New splitter.
> 
> With it, now "make check-gcc" has no new ICEs with unix/-m4/-mlra when
> comparing unix/-m4.

Very nice!  So it seems indeed, splitting up the "mega move patterns" into
simpler ones where predicates are more closer to the actual constraints give
better results (if I'm not mistaken).  Have you also tried using these patterns
without LRA?  I'm just wondering if we need to distinguish between LRA/non-LRA
case at all.

Reply via email to