This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rs6000] Add BE support for first_match_index, first_match_or_eos_index, first_mismatch_index, first_mismatch_or_eos_index
- From: Carl Love <cel at us dot ibm dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: gcc-patches at gcc dot gnu dot org, David Edelsohn <dje dot gcc at gmail dot com>, Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- Date: Wed, 06 Jun 2018 15:30:17 -0700
- Subject: Re: [PATCH, rs6000] Add BE support for first_match_index, first_match_or_eos_index, first_mismatch_index, first_mismatch_or_eos_index
- References: <1528297282.4981.10.camel@us.ibm.com> <20180606204941.GU17342@gate.crashing.org>
Segher:
> > * gcc/config/rs6000/vsx.md (first_match_index_<mode>):
> > Calculate index using natureal element order.
>
> Typo ("natural"). You normally shouldn't do a line break after :
> btw.
>
Fixed both issues.
> One thing that caught my eye, nothing new though:
>
> > {
> > rtx tmp = gen_reg_rtx (SImode);
> > - emit_insn (gen_vctzlsbb_<mode> (tmp, result));
> > + if (!BYTES_BIG_ENDIAN)
> > + emit_insn (gen_vctzlsbb_<mode> (tmp, result));
> > + else
> > + emit_insn (gen_vclzlsbb_<mode> (tmp, result));
> > emit_insn (gen_ashrsi3 (operands[0], tmp, GEN_INT (sh)));
> > }
>
> Can this work with lshrsi3 instead? That is slightly cheaper.
>
> Looks great, please apply to trunk. Thanks!
Yes, the builtin works with lshrsi3 change. I will commit with this
change.
FYI, Bill would like to patch backported to GCC 8. Is that OK?
Carl Love