builtin_str{,n}cmp bug on s390{,x}

Ulrich Weigand weigand@i1.informatik.uni-erlangen.de
Thu Jul 10 18:57:00 GMT 2003


Jakub Jelinek wrote:

> See PR optimization/10339.
> Before that GCC was doing equally bad thing, but on all arches
> (transforming strcmp/strncmp into memcmp).
> IMNSHO that patch should be backported to gcc-3_3-branch (I have it on
> gcc-3_3-rhl-branch for quite some time already), but unlike other arches
> it will make zilch changes on s390*.

Oh well, I guess having two different patterns would be the 
best way to solve this problem.  We don't have an instruction
to implement strncmp semantics on s390 unfortunately (however
we do have an instruction to implement strcmp - CLST - which
is currently not used at all by gcc ...).

B.t.w. the i370 cmpstr pattern behaves the same as the s390 one
in that respect.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de



More information about the Gcc mailing list