]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
sse-init-v2df-1.c: Compile with -mfpmath=sse
authorH.J. Lu <hjl.tools@gmail.com>
Sun, 2 Aug 2026 07:33:35 +0000 (15:33 +0800)
committerH.J. Lu <hjl.tools@gmail.com>
Sun, 2 Aug 2026 07:49:20 +0000 (15:49 +0800)
When GCC is configured with --with-fpmath=sse, i386/ssemath.h is used,
which has

 #undef TARGET_FPMATH_DEFAULT_P
 #define TARGET_FPMATH_DEFAULT_P(x) \
  (TARGET_SSE2_P(x) ? FPMATH_SSE : FPMATH_387)

SSE math is disabled with -mno-sse2.  Since sse-init-v2df-1.c requires
SSE math, compile sse-init-v2df-1.c with -mfpmath=sse so that SSE math
is enabled with "-mno-sse2"

* gcc.target/i386/sse-init-v2df-1.c: Compile with -mfpmath=sse.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
gcc/testsuite/gcc.target/i386/sse-init-v2df-1.c

index f686d4ed5e80f3194179a88832eb36bd2153d36e..7315bd2f2e1c83d2d4e0994b15b653fdb00f9dd1 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -msse -mno-sse2" } */
+/* { dg-options "-O2 -msse -mno-sse2 -mfpmath=sse" } */
 
 typedef double v2df __attribute__ ((__vector_size__ (16)));