From 0a3e6e975abd2b19fc12da7e5430e2a05e92ebcc Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Mon, 14 Sep 2020 19:37:30 +0100 Subject: [PATCH] Darwin, X86, testsuite: Fix pr87767 tests for Darwin. The tests assume non-PIC for m32 (which means that they fail on default PIC targets, like Darwin). There is also a missing space before the closing '}' on one of the dg-require-effective-target which means that test fails on machines without avx512f. gcc/testsuite/ChangeLog: * gcc.target/i386/avx512f-broadcast-pr87767-1.c: Make the test run as non-dynamic for m32 Darwin. * gcc.target/i386/avx512f-broadcast-pr87767-3.c: Likewise. * gcc.target/i386/avx512f-broadcast-pr87767-5.c: Likewise. * gcc.target/i386/avx512f-broadcast-pr87767-7.c: Likewise. * gcc.target/i386/avx512vl-broadcast-pr87767-1.c: Likewise. * gcc.target/i386/avx512vl-broadcast-pr87767-3.c: Likewise. * gcc.target/i386/avx512vl-broadcast-pr87767-5.c: Likewise. * gcc.target/i386/avx512f-broadcast-pr87767-6.c: Adjust dg-requires clause. --- gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-1.c | 1 + gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-3.c | 1 + gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-5.c | 1 + gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-6.c | 2 +- gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-7.c | 1 + gcc/testsuite/gcc.target/i386/avx512vl-broadcast-pr87767-1.c | 1 + gcc/testsuite/gcc.target/i386/avx512vl-broadcast-pr87767-3.c | 1 + gcc/testsuite/gcc.target/i386/avx512vl-broadcast-pr87767-5.c | 1 + 8 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-1.c b/gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-1.c index a8ee5f5faf1..0563e696316 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-1.c @@ -1,6 +1,7 @@ /* PR target/87767 */ /* { dg-do compile } */ /* { dg-options "-O2 -mavx512f -mavx512dq" } */ +/* { dg-additional-options "-mdynamic-no-pic" { target { *-*-darwin* && ia32 } } } /* { dg-final { scan-assembler-times "\[^\n\]*\\\{1to8\\\}" 5 } } */ /* { dg-final { scan-assembler-times "\[^\n\]*\\\{1to16\\\}" 5 } } */ diff --git a/gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-3.c b/gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-3.c index c2f22c4ee5a..e57a5682c31 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-3.c +++ b/gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-3.c @@ -1,6 +1,7 @@ /* PR target/87767 */ /* { dg-do compile } */ /* { dg-options "-O2 -mavx512f" } */ +/* { dg-additional-options "-mdynamic-no-pic" { target { *-*-darwin* && ia32 } } } /* { dg-final { scan-assembler-times "\[^\n\]*\\\{1to8\\\}" 4 } } */ /* { dg-final { scan-assembler-times "\[^\n\]*\\\{1to16\\\}" 4 } } */ diff --git a/gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-5.c b/gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-5.c index 72e1098ccbe..ffbe95980ca 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-5.c +++ b/gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-5.c @@ -1,6 +1,7 @@ /* PR target/87767 */ /* { dg-do compile } */ /* { dg-options "-O2 -mavx512f" } */ +/* { dg-additional-options "-mdynamic-no-pic" { target { *-*-darwin* && ia32 } } } /* { dg-final { scan-assembler-times "\[^n\n\]*\\\{1to8\\\}" 4 } } */ /* { dg-final { scan-assembler-times "\[^n\n\]*\\\{1to16\\\}" 4 } } */ diff --git a/gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-6.c b/gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-6.c index f288f83158c..5bd9a4db339 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-6.c +++ b/gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-6.c @@ -1,7 +1,7 @@ /* PR target/87767 */ /* { dg-do run } */ /* { dg-options "-O2 -mavx512f" } */ -/* { dg-require-effective-target avx512f} */ +/* { dg-require-effective-target avx512f } */ #include "avx512f-helper.h" diff --git a/gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-7.c b/gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-7.c index a8f145d8589..194d888093b 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-7.c +++ b/gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-7.c @@ -1,6 +1,7 @@ /* PR target/87767 */ /* { dg-do compile } */ /* { dg-options "-O2 -mavx512f -mavx512vl" } */ +/* { dg-additional-options "-mdynamic-no-pic" { target { *-*-darwin* && ia32 } } } /* { dg-final { scan-assembler-times "vadd\[^\n\]*\\\{1to2\\\}" 1 } } */ /* { dg-final { scan-assembler-times "vadd\[^\n\]*\\\{1to4\\\}" 2 } } */ /* { dg-final { scan-assembler-times "vadd\[^\n\]*\\\{1to8\\\}" 2 } } */ diff --git a/gcc/testsuite/gcc.target/i386/avx512vl-broadcast-pr87767-1.c b/gcc/testsuite/gcc.target/i386/avx512vl-broadcast-pr87767-1.c index 397e287134c..c06369d93fd 100644 --- a/gcc/testsuite/gcc.target/i386/avx512vl-broadcast-pr87767-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512vl-broadcast-pr87767-1.c @@ -1,6 +1,7 @@ /* PR target/87767 */ /* { dg-do compile } */ /* { dg-options "-O2 -mavx512f -mavx512vl -mavx512dq" } */ +/* { dg-additional-options "-mdynamic-no-pic" { target { *-*-darwin* && ia32 } } } /* { dg-final { scan-assembler-times "\[^\n\]*\\\{1to2\\\}" 5 } } */ /* { dg-final { scan-assembler-times "\[^\n\]*\\\{1to4\\\}" 10 } } */ /* { dg-final { scan-assembler-times "\[^\n\]*\\\{1to8\\\}" 5 } } */ diff --git a/gcc/testsuite/gcc.target/i386/avx512vl-broadcast-pr87767-3.c b/gcc/testsuite/gcc.target/i386/avx512vl-broadcast-pr87767-3.c index aedfb16016e..3b27def147d 100644 --- a/gcc/testsuite/gcc.target/i386/avx512vl-broadcast-pr87767-3.c +++ b/gcc/testsuite/gcc.target/i386/avx512vl-broadcast-pr87767-3.c @@ -1,6 +1,7 @@ /* PR target/87767 */ /* { dg-do compile } */ /* { dg-options "-O2 -mavx512f -mavx512vl" } */ +/* { dg-additional-options "-mdynamic-no-pic" { target { *-*-darwin* && ia32 } } } /* { dg-final { scan-assembler-times "\[^\n\]*\\\{1to2\\\}" 4 } } */ /* { dg-final { scan-assembler-times "\[^\n\]*\\\{1to4\\\}" 8 } } */ /* { dg-final { scan-assembler-times "\[^\n\]*\\\{1to8\\\}" 4 } } */ diff --git a/gcc/testsuite/gcc.target/i386/avx512vl-broadcast-pr87767-5.c b/gcc/testsuite/gcc.target/i386/avx512vl-broadcast-pr87767-5.c index 1e9460faa9d..4998a9b8d51 100644 --- a/gcc/testsuite/gcc.target/i386/avx512vl-broadcast-pr87767-5.c +++ b/gcc/testsuite/gcc.target/i386/avx512vl-broadcast-pr87767-5.c @@ -1,6 +1,7 @@ /* PR target/87767 */ /* { dg-do compile } */ /* { dg-options "-O2 -mavx512f -mavx512vl" } */ +/* { dg-additional-options "-mdynamic-no-pic" { target { *-*-darwin* && ia32 } } } /* { dg-final { scan-assembler-times "\[^\n\]*\\\{1to2\\\}" 4 } } */ /* { dg-final { scan-assembler-times "\[^\n\]*\\\{1to4\\\}" 8 } } */ /* { dg-final { scan-assembler-times "\[^\n\]*\\\{1to8\\\}" 4 } } */ -- 2.30.2