builtin_str{,n}cmp bug on s390{,x}
Jakub Jelinek
jakub@redhat.com
Fri Jul 11 00:25:00 GMT 2003
On Thu, Jul 10, 2003 at 04:06:16PM -0700, Richard Henderson wrote:
> On Thu, Jul 10, 2003 at 08:38:53PM +0200, Ulrich Weigand wrote:
> > ... we do have an instruction to implement strcmp - CLST - which
> > is currently not used at all by gcc ...).
>
> Oh yeah? Then renaming the current pattern to to cmpmemsi
> would seem to be the best solution.
And s390* could also provide cmpstrsi pattern, which would check if length
is ~(size_t)0, bail otherwise.
ATM expand_builtin_strcmp only uses cmpstrM patterns if one argument
is a string literal, but I don't see why it couldn't use it even if
there is no string literal and the length is unknown (ie. worst ~(size_t)0).
Jakub
More information about the Gcc
mailing list