* [PATCH] Adjust testcase.
@ 2022-07-22 2:04 liuhongt
0 siblings, 0 replies; 7+ messages in thread
From: liuhongt @ 2022-07-22 2:04 UTC (permalink / raw)
To: gcc-patches
r13-1762-gf9d4c3b45c5ed5f45c8089c990dbd4e181929c3d lower complex type
move to scalars, but testcase pr23911 is supposed to scan __complex__
constant which is never available, so adjust testcase to scan
IMAGPART/REALPART_EXPR constants separately.
Pushed as obvious patch.
gcc/testsuite/ChangeLog
PR tree-optimization/106010
* gcc.dg/pr23911.c: Scan IMAGPART/REALPART_EXPR = ** instead
of __complex__ since COMPLEX_CST is lower to scalars.
---
gcc/testsuite/gcc.dg/pr23911.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/testsuite/gcc.dg/pr23911.c b/gcc/testsuite/gcc.dg/pr23911.c
index 3fa041222de..691f3507db2 100644
--- a/gcc/testsuite/gcc.dg/pr23911.c
+++ b/gcc/testsuite/gcc.dg/pr23911.c
@@ -16,5 +16,6 @@ test (void)
/* After DCE2 which runs after FRE, the expressions should be fully
constant folded. There should be no loads from b left. */
-/* { dg-final { scan-tree-dump-times "__complex__ \\\(1.0e\\\+0, 0.0\\\)" 2 "dce3" } } */
+/* { dg-final { scan-tree-dump-times {(?n)REALPART_EXPR.*= 1\.0e\+0} 2 "dce3" } } */
+/* { dg-final { scan-tree-dump-times {(?n)IMAGPART_EXPR.*= 0\.0} 2 "dce3" } } */
/* { dg-final { scan-tree-dump-times "= b" 0 "dce3" } } */
--
2.18.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Adjust testcase
2020-08-31 6:19 Hongtao Liu
@ 2020-09-02 9:37 ` Hongtao Liu
0 siblings, 0 replies; 7+ messages in thread
From: Hongtao Liu @ 2020-09-02 9:37 UTC (permalink / raw)
To: GCC Patches
On Mon, Aug 31, 2020 at 2:19 PM Hongtao Liu <crazylht@gmail.com> wrote:
>
> Hi:
> This patch is to adjust testcases which failed the regression test
> when gcc is built with -march=skylake-avx512.
> Also add runtime check for AVX512 tests.
>
> gcc/testsuite/ChangeLog:
> PR target/96246
> PR target/96855
> PR target/96856
> PR target/96857
> * g++.target/i386/avx512bw-pr96246-2.C: Add runtime check for
> AVX512BW.
> * g++.target/i386/avx512vl-pr96246-2.C: Add runtime check for
> AVX512BW and AVX512VL
> * g++.target/i386/avx512f-helper.h: New header.
> * gcc.target/i386/pr92658-avx512f.c: Add
> -mprefer-vector-width=512 to avoid impact of different default
> mtune which gcc is built with.
> * gcc.target/i386/avx512bw-pr95488-1.c: Ditto.
> * gcc.target/i386/pr92645-4.c: Add -mno-avx512f to avoid
> impact of different default march which gcc is built with.
>
>
> --
> BR,
> Hongtao
I am going to check in this patch, the patch only touches the
testcases, and wouldn't affect any functionality of GCC.
--
BR,
Hongtao
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] Adjust testcase
@ 2020-08-31 6:19 Hongtao Liu
2020-09-02 9:37 ` Hongtao Liu
0 siblings, 1 reply; 7+ messages in thread
From: Hongtao Liu @ 2020-08-31 6:19 UTC (permalink / raw)
To: GCC Patches
[-- Attachment #1: Type: text/plain, Size: 892 bytes --]
Hi:
This patch is to adjust testcases which failed the regression test
when gcc is built with -march=skylake-avx512.
Also add runtime check for AVX512 tests.
gcc/testsuite/ChangeLog:
PR target/96246
PR target/96855
PR target/96856
PR target/96857
* g++.target/i386/avx512bw-pr96246-2.C: Add runtime check for
AVX512BW.
* g++.target/i386/avx512vl-pr96246-2.C: Add runtime check for
AVX512BW and AVX512VL
* g++.target/i386/avx512f-helper.h: New header.
* gcc.target/i386/pr92658-avx512f.c: Add
-mprefer-vector-width=512 to avoid impact of different default
mtune which gcc is built with.
* gcc.target/i386/avx512bw-pr95488-1.c: Ditto.
* gcc.target/i386/pr92645-4.c: Add -mno-avx512f to avoid
impact of different default march which gcc is built with.
--
BR,
Hongtao
[-- Attachment #2: 0001-Adjust-testcase.patch --]
[-- Type: text/x-patch, Size: 5132 bytes --]
From 80effa00835d53962608a3607ef79da243a6dc5a Mon Sep 17 00:00:00 2001
From: liuhongt <hongtao.liu@intel.com>
Date: Mon, 31 Aug 2020 10:54:13 +0800
Subject: [PATCH] Adjust testcase.
gcc/testsuite/ChangeLog:
PR target/96246
PR target/96855
PR target/96856
PR target/96857
* g++.target/i386/avx512bw-pr96246-2.C: Add runtime check for
AVX512BW.
* g++.target/i386/avx512vl-pr96246-2.C: Add runtime check for
AVX512BW and AVX512VL
* g++.target/i386/avx512f-helper.h: New header.
* gcc.target/i386/pr92658-avx512f.c: Add
-mprefer-vector-width=512 to avoid impact of different default
mtune which gcc is built with.
* gcc.target/i386/avx512bw-pr95488-1.c: Ditto.
* gcc.target/i386/pr92645-4.c: Add -mno-avx512f to avoid
impact of different default march which gcc is built with.
---
.../g++.target/i386/avx512bw-pr96246-2.C | 9 +++++---
.../g++.target/i386/avx512f-helper.h | 1 +
.../g++.target/i386/avx512vl-pr96246-2.C | 21 +++++++++++++------
.../gcc.target/i386/avx512bw-pr95488-1.c | 2 +-
gcc/testsuite/gcc.target/i386/pr92645-4.c | 2 +-
.../gcc.target/i386/pr92658-avx512f.c | 2 +-
6 files changed, 25 insertions(+), 12 deletions(-)
create mode 100644 gcc/testsuite/g++.target/i386/avx512f-helper.h
diff --git a/gcc/testsuite/g++.target/i386/avx512bw-pr96246-2.C b/gcc/testsuite/g++.target/i386/avx512bw-pr96246-2.C
index b96b7c7c932..30a1b959573 100644
--- a/gcc/testsuite/g++.target/i386/avx512bw-pr96246-2.C
+++ b/gcc/testsuite/g++.target/i386/avx512bw-pr96246-2.C
@@ -3,6 +3,10 @@
/* { dg-require-effective-target avx512bw } */
/* { dg-options "-O2 -std=c++14 -mavx512bw" } */
+#define AVX512BW
+
+#include "avx512f-helper.h"
+
#include "avx512bw-pr96246-1.C"
#define RUNTIME_TEST(vtype, num) \
@@ -24,8 +28,8 @@
} \
while (0)
-int
-main (void)
+void
+test_512 (void)
{
RUNTIME_TEST (v64qi, 64);
RUNTIME_TEST (v32hi, 32);
@@ -33,5 +37,4 @@ main (void)
RUNTIME_TEST (v8di, 8);
RUNTIME_TEST (v16sf, 16);
RUNTIME_TEST (v8df, 8);
- return 0;
}
diff --git a/gcc/testsuite/g++.target/i386/avx512f-helper.h b/gcc/testsuite/g++.target/i386/avx512f-helper.h
new file mode 100644
index 00000000000..09b6bcbf77a
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/avx512f-helper.h
@@ -0,0 +1 @@
+#include "../../gcc.target/i386/avx512f-helper.h"
diff --git a/gcc/testsuite/g++.target/i386/avx512vl-pr96246-2.C b/gcc/testsuite/g++.target/i386/avx512vl-pr96246-2.C
index 9a16f0d2c9e..db9dce2caef 100644
--- a/gcc/testsuite/g++.target/i386/avx512vl-pr96246-2.C
+++ b/gcc/testsuite/g++.target/i386/avx512vl-pr96246-2.C
@@ -4,6 +4,11 @@
/* { dg-require-effective-target avx512vl } */
/* { dg-options "-O2 -std=c++14 -mavx512bw -mavx512vl" } */
+#define AVX512VL
+#define AVX512BW
+
+#include "avx512f-helper.h"
+
#include "avx512vl-pr96246-1.C"
#define RUNTIME_TEST(vtype, num) \
@@ -25,17 +30,21 @@
} \
while (0)
-int
-main (void)
+void
+test_256 (void)
{
- RUNTIME_TEST (v16qi, 16);
RUNTIME_TEST (v32qi, 32);
RUNTIME_TEST (v16hi, 16);
- RUNTIME_TEST (v4si, 4);
RUNTIME_TEST (v8si, 8);
- RUNTIME_TEST (v4sf, 4);
RUNTIME_TEST (v8sf, 8);
RUNTIME_TEST (v4di, 4);
RUNTIME_TEST (v4df, 4);
- return 0;
+}
+
+void
+test_128 (void)
+{
+ RUNTIME_TEST (v16qi, 16);
+ RUNTIME_TEST (v4si, 4);
+ RUNTIME_TEST (v4sf, 4);
}
diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-pr95488-1.c b/gcc/testsuite/gcc.target/i386/avx512bw-pr95488-1.c
index 594e511868d..e6e0ac2fd82 100644
--- a/gcc/testsuite/gcc.target/i386/avx512bw-pr95488-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512bw-pr95488-1.c
@@ -1,6 +1,6 @@
/* PR target/95488 */
/* { dg-do compile } */
-/* { dg-options "-O2 -mavx512bw" } */
+/* { dg-options "-O2 -mavx512bw -mprefer-vector-width=512" } */
/* { dg-final { scan-assembler-times "vpmovzxbw" 4 } } */
/* { dg-final { scan-assembler-times "vpmullw\[^\n\]*zmm" 2 } } */
/* { dg-final { scan-assembler-times "vpmovwb" 2 } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr92645-4.c b/gcc/testsuite/gcc.target/i386/pr92645-4.c
index 5d459040846..28a3f9a3527 100644
--- a/gcc/testsuite/gcc.target/i386/pr92645-4.c
+++ b/gcc/testsuite/gcc.target/i386/pr92645-4.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mavx2 -fdump-tree-optimized -Wno-psabi" } */
+/* { dg-options "-O2 -mavx2 -fdump-tree-optimized -Wno-psabi -mno-avx512f" } */
typedef unsigned int u32v4 __attribute__((vector_size(16)));
typedef unsigned short u16v16 __attribute__((vector_size(32)));
diff --git a/gcc/testsuite/gcc.target/i386/pr92658-avx512f.c b/gcc/testsuite/gcc.target/i386/pr92658-avx512f.c
index 2ba29074a81..e9ee3d24232 100644
--- a/gcc/testsuite/gcc.target/i386/pr92658-avx512f.c
+++ b/gcc/testsuite/gcc.target/i386/pr92658-avx512f.c
@@ -1,6 +1,6 @@
/* PR target/92658 */
/* { dg-do compile } */
-/* { dg-options "-O2 -ftree-vectorize -mavx512f" } */
+/* { dg-options "-O2 -ftree-vectorize -mavx512f -mprefer-vector-width=512" } */
typedef unsigned char v8qi __attribute__((vector_size (8)));
typedef unsigned char v16qi __attribute__((vector_size (16)));
--
2.18.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH]Adjust testcase.
2020-08-25 20:01 ` Jakub Jelinek
@ 2020-08-25 20:18 ` Jeff Law
0 siblings, 0 replies; 7+ messages in thread
From: Jeff Law @ 2020-08-25 20:18 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Hongtao Liu, GCC Patches
On Tue, 2020-08-25 at 22:01 +0200, Jakub Jelinek wrote:
> On Tue, Aug 25, 2020 at 01:45:01PM -0600, Jeff Law via Gcc-patches wrote:
> > On Tue, 2020-08-18 at 15:18 +0800, Hongtao Liu via Gcc-patches wrote:
> > > Hi:
> > > Rewriting testcase with cpp source file, then compare operator could
> > > be used directly for vector, this would avoid impact of vectorizer.
> > >
> > > gcc/testsuite/ChangeLog:
> > > PR target/96667
> > > * gcc.target/i386/avx512bw-pr96246-1.c: Moved to...
> > > * g++.target/i386/avx512bw-pr96246-1.C: ...here.
> > > * gcc.target/i386/avx512bw-pr96246-2.c: Moved to...
> > > * g++.target/i386/avx512bw-pr96246-2.C: ...here.
> > > * gcc.target/i386/avx512vl-pr96246-1.c: Moved to...
> > > * g++.target/i386/avx512vl-pr96246-1.C: ...here.
> > > * gcc.target/i386/avx512vl-pr96246-2.c: Moved to...
> > > * g++.target/i386/avx512vl-pr96246-2.C: ...here.
> >
> > Shouldn't these go into g++.target/i386?
>
> They should, but the patch is moving them there and the ChangeLog entry says
> that.
Good grief. I missed that. This patch is OK ;-)
jeff
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH]Adjust testcase.
2020-08-25 19:45 ` Jeff Law
@ 2020-08-25 20:01 ` Jakub Jelinek
2020-08-25 20:18 ` Jeff Law
0 siblings, 1 reply; 7+ messages in thread
From: Jakub Jelinek @ 2020-08-25 20:01 UTC (permalink / raw)
To: law; +Cc: Hongtao Liu, GCC Patches
On Tue, Aug 25, 2020 at 01:45:01PM -0600, Jeff Law via Gcc-patches wrote:
> On Tue, 2020-08-18 at 15:18 +0800, Hongtao Liu via Gcc-patches wrote:
> > Hi:
> > Rewriting testcase with cpp source file, then compare operator could
> > be used directly for vector, this would avoid impact of vectorizer.
> >
> > gcc/testsuite/ChangeLog:
> > PR target/96667
> > * gcc.target/i386/avx512bw-pr96246-1.c: Moved to...
> > * g++.target/i386/avx512bw-pr96246-1.C: ...here.
> > * gcc.target/i386/avx512bw-pr96246-2.c: Moved to...
> > * g++.target/i386/avx512bw-pr96246-2.C: ...here.
> > * gcc.target/i386/avx512vl-pr96246-1.c: Moved to...
> > * g++.target/i386/avx512vl-pr96246-1.C: ...here.
> > * gcc.target/i386/avx512vl-pr96246-2.c: Moved to...
> > * g++.target/i386/avx512vl-pr96246-2.C: ...here.
>
> Shouldn't these go into g++.target/i386?
They should, but the patch is moving them there and the ChangeLog entry says
that.
Jakub
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH]Adjust testcase.
2020-08-18 7:18 [PATCH]Adjust testcase Hongtao Liu
@ 2020-08-25 19:45 ` Jeff Law
2020-08-25 20:01 ` Jakub Jelinek
0 siblings, 1 reply; 7+ messages in thread
From: Jeff Law @ 2020-08-25 19:45 UTC (permalink / raw)
To: Hongtao Liu, GCC Patches
On Tue, 2020-08-18 at 15:18 +0800, Hongtao Liu via Gcc-patches wrote:
> Hi:
> Rewriting testcase with cpp source file, then compare operator could
> be used directly for vector, this would avoid impact of vectorizer.
>
> gcc/testsuite/ChangeLog:
> PR target/96667
> * gcc.target/i386/avx512bw-pr96246-1.c: Moved to...
> * g++.target/i386/avx512bw-pr96246-1.C: ...here.
> * gcc.target/i386/avx512bw-pr96246-2.c: Moved to...
> * g++.target/i386/avx512bw-pr96246-2.C: ...here.
> * gcc.target/i386/avx512vl-pr96246-1.c: Moved to...
> * g++.target/i386/avx512vl-pr96246-1.C: ...here.
> * gcc.target/i386/avx512vl-pr96246-2.c: Moved to...
> * g++.target/i386/avx512vl-pr96246-2.C: ...here.
Shouldn't these go into g++.target/i386?
jeff
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH]Adjust testcase.
@ 2020-08-18 7:18 Hongtao Liu
2020-08-25 19:45 ` Jeff Law
0 siblings, 1 reply; 7+ messages in thread
From: Hongtao Liu @ 2020-08-18 7:18 UTC (permalink / raw)
To: GCC Patches
[-- Attachment #1: Type: text/plain, Size: 678 bytes --]
Hi:
Rewriting testcase with cpp source file, then compare operator could
be used directly for vector, this would avoid impact of vectorizer.
gcc/testsuite/ChangeLog:
PR target/96667
* gcc.target/i386/avx512bw-pr96246-1.c: Moved to...
* g++.target/i386/avx512bw-pr96246-1.C: ...here.
* gcc.target/i386/avx512bw-pr96246-2.c: Moved to...
* g++.target/i386/avx512bw-pr96246-2.C: ...here.
* gcc.target/i386/avx512vl-pr96246-1.c: Moved to...
* g++.target/i386/avx512vl-pr96246-1.C: ...here.
* gcc.target/i386/avx512vl-pr96246-2.c: Moved to...
* g++.target/i386/avx512vl-pr96246-2.C: ...here.
--
BR,
Hongtao
[-- Attachment #2: 0001-Adjust-testcase.patch --]
[-- Type: text/x-patch, Size: 6532 bytes --]
From 51395137a777c1f9562ac7b0258acf5edf9d360d Mon Sep 17 00:00:00 2001
From: liuhongt <hongtao.liu@intel.com>
Date: Tue, 18 Aug 2020 15:06:01 +0800
Subject: [PATCH] Adjust testcase.
gcc/testsuite/ChangeLog:
PR target/96667
* gcc.target/i386/avx512bw-pr96246-1.c: Moved to...
* g++.target/i386/avx512bw-pr96246-1.C: ...here.
* gcc.target/i386/avx512bw-pr96246-2.c: Moved to...
* g++.target/i386/avx512bw-pr96246-2.C: ...here.
* gcc.target/i386/avx512vl-pr96246-1.c: Moved to...
* g++.target/i386/avx512vl-pr96246-1.C: ...here.
* gcc.target/i386/avx512vl-pr96246-2.c: Moved to...
* g++.target/i386/avx512vl-pr96246-2.C: ...here.
---
.../i386/avx512bw-pr96246-1.C} | 11 ++++------
.../i386/avx512bw-pr96246-2.C} | 20 +++++--------------
.../i386/avx512vl-pr96246-1.C} | 11 ++++------
.../i386/avx512vl-pr96246-2.C} | 20 +++++--------------
4 files changed, 18 insertions(+), 44 deletions(-)
rename gcc/testsuite/{gcc.target/i386/avx512bw-pr96246-1.c => g++.target/i386/avx512bw-pr96246-1.C} (68%)
rename gcc/testsuite/{gcc.target/i386/avx512bw-pr96246-2.c => g++.target/i386/avx512bw-pr96246-2.C} (74%)
rename gcc/testsuite/{gcc.target/i386/avx512vl-pr96246-1.c => g++.target/i386/avx512vl-pr96246-1.C} (73%)
rename gcc/testsuite/{gcc.target/i386/avx512vl-pr96246-2.c => g++.target/i386/avx512vl-pr96246-2.C} (76%)
diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-pr96246-1.c b/gcc/testsuite/g++.target/i386/avx512bw-pr96246-1.C
similarity index 68%
rename from gcc/testsuite/gcc.target/i386/avx512bw-pr96246-1.c
rename to gcc/testsuite/g++.target/i386/avx512bw-pr96246-1.C
index 2bfcc840a91..eec844460f1 100644
--- a/gcc/testsuite/gcc.target/i386/avx512bw-pr96246-1.c
+++ b/gcc/testsuite/g++.target/i386/avx512bw-pr96246-1.C
@@ -1,8 +1,8 @@
/* PR target/96246 */
/* { dg-do compile } */
-/* { dg-options "-O2 -ftree-vectorize -mavx512bw" } */
-/* { dg-final { scan-assembler-times "vpblendm\[bwdq\]\[\t ]" 4 } } */
-/* { dg-final { scan-assembler-times "vblendmp\[sd\]\[\t ]" 2 } } */
+/* { dg-options "-O2 -std=c++14 -mavx512bw" } */
+/* { dg-final { scan-assembler-times "vpblendm\[bwdq\]\[\t \]" 4 } } */
+/* { dg-final { scan-assembler-times "vblendmp\[sd\]\[\t \]" 2 } } */
typedef char v64qi __attribute__((vector_size (64)));
typedef short v32hi __attribute__((vector_size (64)));
@@ -16,10 +16,7 @@ typedef double v8df __attribute__((vector_size (64)));
__attribute__ ((noipa)) \
foo_##vtype (vtype a, vtype b, vtype c, vtype d) \
{ \
- vtype e; \
- for (int i = 0; i != num; i++) \
- e[i] = a[i] > b[i] ? c[i] : d[i]; \
- return e; \
+ return a > b ? c : d; \
}
COMPILE_TEST (v64qi, 64);
diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-pr96246-2.c b/gcc/testsuite/g++.target/i386/avx512bw-pr96246-2.C
similarity index 74%
rename from gcc/testsuite/gcc.target/i386/avx512bw-pr96246-2.c
rename to gcc/testsuite/g++.target/i386/avx512bw-pr96246-2.C
index 422fcfe4ea8..b96b7c7c932 100644
--- a/gcc/testsuite/gcc.target/i386/avx512bw-pr96246-2.c
+++ b/gcc/testsuite/g++.target/i386/avx512bw-pr96246-2.C
@@ -1,19 +1,9 @@
/* PR target/96246 */
/* { dg-do run } */
/* { dg-require-effective-target avx512bw } */
-/* { dg-options "-Ofast -mavx512bw" } */
+/* { dg-options "-O2 -std=c++14 -mavx512bw" } */
-#ifndef CHECK
-#define CHECK "avx512f-helper.h"
-#endif
-
-#include CHECK
-
-#ifndef TEST
-#define TEST avx512bw_test
-#endif
-
-#include "avx512bw-pr96246-1.c"
+#include "avx512bw-pr96246-1.C"
#define RUNTIME_TEST(vtype, num) \
do \
@@ -34,9 +24,8 @@
} \
while (0)
-static void
-__attribute__ ((optimize (0)))
-TEST (void)
+int
+main (void)
{
RUNTIME_TEST (v64qi, 64);
RUNTIME_TEST (v32hi, 32);
@@ -44,4 +33,5 @@ TEST (void)
RUNTIME_TEST (v8di, 8);
RUNTIME_TEST (v16sf, 16);
RUNTIME_TEST (v8df, 8);
+ return 0;
}
diff --git a/gcc/testsuite/gcc.target/i386/avx512vl-pr96246-1.c b/gcc/testsuite/g++.target/i386/avx512vl-pr96246-1.C
similarity index 73%
rename from gcc/testsuite/gcc.target/i386/avx512vl-pr96246-1.c
rename to gcc/testsuite/g++.target/i386/avx512vl-pr96246-1.C
index 95357d6fc84..66eb9d25f1e 100644
--- a/gcc/testsuite/gcc.target/i386/avx512vl-pr96246-1.c
+++ b/gcc/testsuite/g++.target/i386/avx512vl-pr96246-1.C
@@ -1,8 +1,8 @@
/* PR target/96246 */
/* { dg-do compile } */
-/* { dg-options "-O2 -ftree-vectorize -mavx512bw -mavx512vl" } */
-/* { dg-final { scan-assembler-times "vpblendm\[bwdq\]\[\t ]" 6 } } */
-/* { dg-final { scan-assembler-times "vblendmp\[sd\]\[\t ]" 3 } } */
+/* { dg-options "-O2 -std=c++14 -mavx512bw -mavx512vl" } */
+/* { dg-final { scan-assembler-times "vpblendm\[bwdq\]\[\t \]" 6 } } */
+/* { dg-final { scan-assembler-times "vblendmp\[sd\]\[\t \]" 3 } } */
typedef char v16qi __attribute__ ((vector_size (16)));
typedef char v32qi __attribute__ ((vector_size (32)));
@@ -19,10 +19,7 @@ typedef double v4df __attribute__((vector_size (32)));
__attribute__ ((noipa)) \
foo_##vtype (vtype a, vtype b, vtype c, vtype d) \
{ \
- vtype e; \
- for (int i = 0; i != num; i++) \
- e[i] = a[i] > b[i] ? c[i] : d[i]; \
- return e; \
+ return a > b ? c : d; \
}
COMPILE_TEST (v16qi, 16);
diff --git a/gcc/testsuite/gcc.target/i386/avx512vl-pr96246-2.c b/gcc/testsuite/g++.target/i386/avx512vl-pr96246-2.C
similarity index 76%
rename from gcc/testsuite/gcc.target/i386/avx512vl-pr96246-2.c
rename to gcc/testsuite/g++.target/i386/avx512vl-pr96246-2.C
index d219f7c15ad..9a16f0d2c9e 100644
--- a/gcc/testsuite/gcc.target/i386/avx512vl-pr96246-2.c
+++ b/gcc/testsuite/g++.target/i386/avx512vl-pr96246-2.C
@@ -2,19 +2,9 @@
/* { dg-do run } */
/* { dg-require-effective-target avx512bw } */
/* { dg-require-effective-target avx512vl } */
-/* { dg-options "-Ofast -mavx512bw -mavx512vl" } */
+/* { dg-options "-O2 -std=c++14 -mavx512bw -mavx512vl" } */
-#ifndef CHECK
-#define CHECK "avx512f-helper.h"
-#endif
-
-#include CHECK
-
-#ifndef TEST
-#define TEST avx512bw_test
-#endif
-
-#include "avx512vl-pr96246-1.c"
+#include "avx512vl-pr96246-1.C"
#define RUNTIME_TEST(vtype, num) \
do \
@@ -35,9 +25,8 @@
} \
while (0)
-static void
-__attribute__ ((optimize (0)))
-TEST (void)
+int
+main (void)
{
RUNTIME_TEST (v16qi, 16);
RUNTIME_TEST (v32qi, 32);
@@ -48,4 +37,5 @@ TEST (void)
RUNTIME_TEST (v8sf, 8);
RUNTIME_TEST (v4di, 4);
RUNTIME_TEST (v4df, 4);
+ return 0;
}
--
2.18.1
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-07-22 2:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-22 2:04 [PATCH] Adjust testcase liuhongt
-- strict thread matches above, loose matches on Subject: below --
2020-08-31 6:19 Hongtao Liu
2020-09-02 9:37 ` Hongtao Liu
2020-08-18 7:18 [PATCH]Adjust testcase Hongtao Liu
2020-08-25 19:45 ` Jeff Law
2020-08-25 20:01 ` Jakub Jelinek
2020-08-25 20:18 ` Jeff Law
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).