Avoid instructions that incur expensive length-changing prefix (LCP) stalls
commitce559b32297340da83ff076085ae97e2ba24e56d
authortejohnson <tejohnson@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 Apr 2012 05:03:49 +0000 (6 05:03 +0000)
committertejohnson <tejohnson@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 Apr 2012 05:03:49 +0000 (6 05:03 +0000)
treea12fd9a169d4afde5d4da2344818e26d9caa4a08
parent13f523878b333323528b0e9878879c8bf7707084
Avoid instructions that incur expensive length-changing prefix (LCP) stalls
on some x86-64 implementations, notably Core2 and Corei7. Specifically, a move of
a 16-bit constant into memory requires a length-changing prefix and can incur significant
penalties. Modified an old patch written by H.J to split such instructions
during peephole2.

2012-04-05  Teresa Johnson  <tejohnson@google.com>
    H.J. Lu  <hongjiu.lu@intel.com>

* config/i386/i386.h (ix86_tune_indices): Add
X86_TUNE_LCP_STALL.
* config/i386/i386.md (move immediate to memory peephole2):
Add cases for HImode move when LCP stall avoidance is needed.
* config/i386/i386.c (initial_ix86_tune_features): Initialize
X86_TUNE_LCP_STALL entry.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186176 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/config/i386/i386.h
gcc/config/i386/i386.md