public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, Darwin, testsuite, committed] Fix PR81058.
@ 2019-05-11 15:14 Iain Sandoe
  0 siblings, 0 replies; only message in thread
From: Iain Sandoe @ 2019-05-11 15:14 UTC (permalink / raw)
  To: GCC-patches

[-- Attachment #1: Type: text/plain, Size: 691 bytes --]

The tests fail as noted in the PR, because Darwin’s ABI mandates indirection for common accesses, which means that the codegen doesn’t match what the tests expect.

In this case, we can fix this simply by placing the relevant vars in the regular data section (by appending -fno-common to the test flags).

Applied to trunk, will backport in due course.

thanks.
Iain

gcc/testsuite/

2019-05-11  Iain Sandoe  <iain@sandoe.co.uk>

	PR testsuite/81058
	* gcc.target/i386/avx512bw-vpmovswb-1.c: Use regular data section
	for variables on Darwin, rather than common.
	* gcc.target/i386/avx512bw-vpmovuswb-1.c: Likewise.
	* gcc.target/i386/avx512bw-vpmovwb-1.c: Likewise.


[-- Attachment #2: pr81058-trunk.diff --]
[-- Type: application/octet-stream, Size: 3086 bytes --]

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 2efe608..c082922 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2019-05-11  Iain Sandoe  <iain@sandoe.co.uk>
+
+	PR testsuite/81058
+	* gcc.target/i386/avx512bw-vpmovswb-1.c: Use regular data section
+	for variables on Darwin, rather than common.
+	* gcc.target/i386/avx512bw-vpmovuswb-1.c: Likewise.
+	* gcc.target/i386/avx512bw-vpmovwb-1.c: Likewise.
+
 2019-05-11  Paolo Carlini  <paolo.carlini@oracle.com>
 
 	* g++.dg/cpp2a/multiple-deleted-destroying-delete-error-1.C: New.
diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-vpmovswb-1.c b/gcc/testsuite/gcc.target/i386/avx512bw-vpmovswb-1.c
index 6bb87d2..9d470c6 100644
--- a/gcc/testsuite/gcc.target/i386/avx512bw-vpmovswb-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512bw-vpmovswb-1.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-mavx512bw -mavx512vl -O2" } */
+/* { dg-additional-options "-fno-common" { target *-*-darwin* } } */
 /* { dg-final { scan-assembler-times "vpmovswb\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
 /* { dg-final { scan-assembler-times "vpmovswb\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
 /* { dg-final { scan-assembler-times "vpmovswb\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}{z}(?:\n|\[ \\t\]+#)" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-vpmovuswb-1.c b/gcc/testsuite/gcc.target/i386/avx512bw-vpmovuswb-1.c
index 7825e46..da51198 100644
--- a/gcc/testsuite/gcc.target/i386/avx512bw-vpmovuswb-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512bw-vpmovuswb-1.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-mavx512bw -mavx512vl -O2" } */
+/* { dg-additional-options "-fno-common" { target *-*-darwin* } } */
 /* { dg-final { scan-assembler-times "vpmovuswb\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
 /* { dg-final { scan-assembler-times "vpmovuswb\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
 /* { dg-final { scan-assembler-times "vpmovuswb\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}{z}(?:\n|\[ \\t\]+#)" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-vpmovwb-1.c b/gcc/testsuite/gcc.target/i386/avx512bw-vpmovwb-1.c
index a1ad551..e67da87 100644
--- a/gcc/testsuite/gcc.target/i386/avx512bw-vpmovwb-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512bw-vpmovwb-1.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-mavx512bw -mavx512vl -O2" } */
+/* { dg-additional-options "-fno-common" { target *-*-darwin* } } */
 /* { dg-final { scan-assembler-times "vpmovwb\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
 /* { dg-final { scan-assembler-times "vpmovwb\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
 /* { dg-final { scan-assembler-times "vpmovwb\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}{z}(?:\n|\[ \\t\]+#)" 1 } } */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-05-11 15:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-11 15:14 [PATCH, Darwin, testsuite, committed] Fix PR81058 Iain Sandoe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).