This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Use cmpstr and cmpstrn optabs
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: richard dot sandiford at arm dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 01 Aug 2015 18:28:06 +0900 (JST)
- Subject: Re: Use cmpstr and cmpstrn optabs
- Authentication-results: sourceware.org; auth=none
- References: <87k2tglf9g dot fsf at e105548-lin dot cambridge dot arm dot com>
Richard Sandiford <richard.sandiford@arm.com> wrote:
> This patch converts the code to do everything via the optabs interface.
> This required a change to the sh.md cmpstrn pattern, where the length
> predicate was "immediate_operand" but where the expander code wanted
> to handle nonimmediates too. I also removed the now-redundant
> force_operand of the length in the rx.md pattern (because the
> predicate is now enforced and already an operand).
>
> The check whether "target" has insn_mode is performed by
> create_output_operand so we no longer need to check it in
> the builtins.c code too.
>
> Bootstrapped & regression-tested on x86_64-linux-gnu. Also tested by
> building ft32-elf, s390x-linux-gnu, m32c-elf, rx-elf and sh4-elf
> and checking that (with the appropriate target flags) the optabs
> are working for various strcmp and strncmp calls. OK to install?
SH portion looks fine. No new failures with the patch on
sh4-unknown-linux-gnu.
Regards,
kaz