On Sat, 2014-09-27 at 11:10 -0700, Andi Kleen wrote:
> From: Andi Kleen <a...@linux.intel.com>
> 
> In my tests the optimized glibc out of line strcmp is always faster than
> using inline rep ; cmpsb, even for small strings. The Intel optimization 
> manual
> also recommends to not use it. So remove the cmpstrnsi instruction.
> 
> Tested on Sandy Bridge, Westmere Intel CPUs.
> 
> gcc/:
> 
> 2014-09-27  Andi Kleen        <a...@linux.intel.com>
> 
>       * config/i386/i386.md (cmpstrnsi, cmpintqi): Remove expanders.

This has been mentioned a while ago, e.g.
https://gcc.gnu.org/ml/gcc/2002-10/msg01616.html
https://gcc.gnu.org/ml/gcc/2003-04/msg00166.html

Instead of just completely removing it, how about disabling it for newer
CPU types if not optimizing for size?

Cheers,
Oleg

Reply via email to