On Tue, Feb 19, 2019 at 6:16 AM Uros Bizjak <ubiz...@gmail.com> wrote: > > On Tue, Feb 19, 2019 at 2:49 PM H.J. Lu <hjl.to...@gmail.com> wrote: > > > > ix86_fpmath should be set to combination of FPMATH_387 and FPMATH_SSE. > > When SSE is disabled, it should be set to FPMATH_387 and 387 codegen is > > also controlled by -msoft-float. > > > > gcc/ > > > > PR target/89397 > > * config/i386/i386.c (ix86_option_override_internal): Set > > opts->x_ix86_fpmath to FPMATH_387 when SSE is disabled. > > > > gcc/testsuite/ > > > > PR target/89397 > > * gcc.target/i386/pr89397.c: New test. > > OK. >
This patch is need to fix: FAIL: gcc.target/i386/pr67985-3.c scan-assembler movd[ \t]%xmm[0-7], %eax FAIL: gcc.target/i386/pr67985-3.c scan-assembler mulss OK for trunk? Thanks. -- H.J.
From 6d7cf57984055c640465450dc9ed74da093b5768 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" <hjl.to...@gmail.com> Date: Tue, 19 Feb 2019 12:05:12 -0800 Subject: [PATCH] i386: Adjust gcc.target/i386/pr67985-3.c Since -march=lakemont turns off 80387 and SSE, -miamcu -mfpmath=sse -march=lakemont results in -mfpmath=387, __attribute__((target("arch=haswell"))) doesn't enable SSE FP math. SSE shouldn't be used for FP math in pr67985-3.c. PR target/89397 * gcc.target/i386/pr67985-3.c: Update. --- gcc/testsuite/gcc.target/i386/pr67985-3.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.target/i386/pr67985-3.c b/gcc/testsuite/gcc.target/i386/pr67985-3.c index 10705f5b231..e863d5b3bb4 100644 --- a/gcc/testsuite/gcc.target/i386/pr67985-3.c +++ b/gcc/testsuite/gcc.target/i386/pr67985-3.c @@ -8,5 +8,6 @@ foo (float x, float y) return x * y; } -/* { dg-final { scan-assembler "mulss" } } */ -/* { dg-final { scan-assembler "movd\[ \t\]%xmm\[0-7\], %eax" } } */ +/* { dg-final { scan-assembler-not "mulss" } } */ +/* { dg-final { scan-assembler-not "movl\[ \t\].*, %eax" } } */ +/* { dg-final { scan-assembler-not "call\[ \t\]__mulsf3" } } */ -- 2.20.1