Fix PR target/19240

Uros Bizjak uros@kss-loka.si
Tue Jan 4 07:26:00 GMT 2005


Hello!

This patch fixes target/19240, where we emit a 387 instructions for 
TARGET_SSE_MATH. The problem was, that some i387 patterns were not fully 
shadowed by corresponding SSE pattern. This patch disables these i387 
patterns for TARGET_SSE_MATH.

Patch was bootstrapped on pentium4-pc-linux-gnu, regtesting is in progress.

OK for mainline?

BTW: As it is claimed by reporter, mixing 387 and SSE code can introduce 
~15% slowdown for FP intensive code. I would like to point on similar 
problem with FP compares 
(http://gcc.gnu.org/ml/gcc/2004-12/msg01029.html) and PR target/19009, 
where SSE code is generated when -mfpmath=387 is specified and vice 
versa. For pentium4, FP->SSE and SSE->FP moves are not cheap at all. The 
latency of movsd from/to memory and the latency of fld/fst to/from 
memory is ~7 cycles for every insn! This means that the latency of move 
to/from memory is more than the latency of FP multiply insn.

2005-01-04  Uros Bizjak  <uros@kss-loka.si>

    PR target/19240
    * config/i386/i386.md (*fop_df_1_i387): Disable for TARGET_SSE_MATH.
    (*fop_df_1_i387): Disable for (TARGET_SSE2 && TARGET_SSE_MATH).

Uros.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: i386.md.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20050104/719f653c/attachment.ksh>


More information about the Gcc-patches mailing list