On 10/8/21 16:23, Stefan Schulze Frielinghaus wrote:
> On Thu, Oct 07, 2021 at 11:16:24AM +0200, Andreas Krebbel wrote:
>> On 9/20/21 11:24, Stefan Schulze Frielinghaus wrote:
>>> This patch implements the rawmemchr expander as introduced in
>>> https://gcc.gnu.org/pipermail/gcc-patches/2021-September/579649.html
>>>
>>> Bootstrapped and regtested in conjunction with the patch from above on
>>> IBM Z.  Ok for mainline?
>>>
>>
>>> From 551362cda54048dc1a51588112f11c070ed52020 Mon Sep 17 00:00:00 2001
>>> From: Stefan Schulze Frielinghaus <stefa...@linux.ibm.com>
>>> Date: Mon, 8 Feb 2021 10:35:39 +0100
>>> Subject: [PATCH 2/2] IBM Z: Provide rawmemchr{qi,hi,si} expander
>>>
>>> gcc/ChangeLog:
>>>
>>>     * config/s390/s390-protos.h (s390_rawmemchrqi): Add prototype.
>>>     (s390_rawmemchrhi): Add prototype.
>>>     (s390_rawmemchrsi): Add prototype.
>>>     * config/s390/s390.c (s390_rawmemchr): New function.
>>>     (s390_rawmemchrqi): New function.
>>>     (s390_rawmemchrhi): New function.
>>>     (s390_rawmemchrsi): New function.
>>>     * config/s390/s390.md (rawmemchr<SINT:mode>): New expander.
>>>     (rawmemchr<SINT:mode><P:mode>): New expander.
>>>     * config/s390/vector.md (vec_vfees<mode>): Basically a copy of
>>>     the pattern vfees<mode> from vx-builtins.md.
>>>     * config/s390/vx-builtins.md (*vfees<mode>): Remove.
>>
>> Thanks! Would it make sense to also extend the strlen and movstr expanders
>> we have to support the additional character modes?
> 
> For strlen-like loops over non-character arrays the current
> implementation in the loop distribution pass uses rawmemchr<MODE> and
> computes pointer difference in order to compute the length.  Thus we get
> strlen<MODE> for free and don't need to reimplement it.

Good to know. Thanks!

...
> Please find a new version attached.  I did another bootstrap+regtest on
> IBM Z.  Ok for mainline?
> 
> Thanks for your detailed review!

Ok for mainline. Thanks!

Andreas

Reply via email to