]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite/123137 - fix FAIL of g++.dg/vect/pr64410.cc on i?86
authorRichard Biener <rguenther@suse.de>
Tue, 16 Dec 2025 12:08:19 +0000 (13:08 +0100)
committerRichard Biener <rguenther@suse.de>
Tue, 16 Dec 2025 12:12:41 +0000 (13:12 +0100)
The following works around SRA not being able to decompose an
aggregate copy of std::complex because with x87 math ld/st pairs
are not bit-preserving by adding -msse -mfpmath=sse.  This avoids
spurious failures of the testcase.

PR testsuite/123137
* g++.dg/vect/pr64410.cc: Add -mfpmath=sse -msse on x86.

gcc/testsuite/g++.dg/vect/pr64410.cc

index dd0256c2fe063d4d8046a57ffa6d3ac995a1485e..5bc92f74bd5819754e1c2c0fd583283f75a54892 100644 (file)
@@ -1,6 +1,9 @@
 // { dg-do compile }
 // { dg-require-effective-target vect_double }
 // { dg-additional-options "-fexcess-precision=fast" }
+// We require decomposing a structure copy to double load/store pairs which
+// is not possible with x87 math.
+// { dg-additional-options "-msse -mfpmath=sse" { target { x86_64-*-* i?86-*-* } } }
 // { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
@@ -51,4 +54,4 @@ main(int argc, char** argv)
   return 0;
 }
 
-// { dg-final { scan-tree-dump "pr64410.cc:46:29: optimized: loop vectorized" "vect" } }
+// { dg-final { scan-tree-dump "pr64410.cc:49:29: optimized: loop vectorized" "vect" } }