[gcc(refs/users/marxin/heads/marxin-gcc-benchmark-branch)] testsuite: Fix up pr91838.C test [PR91838]
Martin Liska
marxin@gcc.gnu.org
Mon Mar 30 10:41:48 GMT 2020
https://gcc.gnu.org/g:5910b14503dd82772dfeca5336a0176f9b1d260a
commit 5910b14503dd82772dfeca5336a0176f9b1d260a
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri Jan 31 19:35:11 2020 +0100
testsuite: Fix up pr91838.C test [PR91838]
The test FAILs on i686-linux with:
FAIL: g++.dg/pr91838.C (test for excess errors)
Excess errors:
/home/jakub/src/gcc/gcc/testsuite/g++.dg/pr91838.C:7:8: warning: MMX vector return without MMX enabled changes the ABI [-Wpsabi]
/home/jakub/src/gcc/gcc/testsuite/g++.dg/pr91838.C:7:3: warning: MMX vector argument without MMX enabled changes the ABI [-Wpsabi]
and on x86_64-linux with -m32 testing with failure to match the
expected pattern in there (or both with e.g. -m32/-mno-mmx/-mno-sse testing).
The test is also in a wrong directory, has non-standard specification that
it requires c++11 or later.
2020-01-31 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/91838
* g++.dg/pr91838.C: Moved to ...
* g++.dg/opt/pr91838.C: ... here. Require c++11 target instead of
dg-skip-if for c++98. Pass -Wno-psabi -w to avoid psabi style
warnings on vector arg passing or return. Add -masm=att on i?86/x86_64.
Only check for pxor %xmm0, %xmm0 on lp64 i?86/x86_64.
Diff:
---
gcc/testsuite/ChangeLog | 9 +++++++++
gcc/testsuite/g++.dg/opt/pr91838.C | 11 +++++++++++
gcc/testsuite/g++.dg/pr91838.C | 11 -----------
3 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index b23973461d9..ae146020aa8 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2020-01-31 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/91838
+ * g++.dg/pr91838.C: Moved to ...
+ * g++.dg/opt/pr91838.C: ... here. Require c++11 target instead of
+ dg-skip-if for c++98. Pass -Wno-psabi -w to avoid psabi style
+ warnings on vector arg passing or return. Add -masm=att on i?86/x86_64.
+ Only check for pxor %xmm0, %xmm0 on lp64 i?86/x86_64.
+
2020-01-31 Richard Sandiford <richard.sandiford@arm.com>
* lib/target-supports.exp (check_effective_target_aarch64_asm_bf16_ok):
diff --git a/gcc/testsuite/g++.dg/opt/pr91838.C b/gcc/testsuite/g++.dg/opt/pr91838.C
new file mode 100644
index 00000000000..fdf48094ade
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr91838.C
@@ -0,0 +1,11 @@
+/* { dg-do compile { target c++11 } } */
+/* { dg-additional-options "-O2 -Wno-psabi -w" } */
+/* { dg-additional-options "-masm=att" { target i?86-*-* x86_64-*-* } } */
+
+using T = unsigned char; // or ushort
+using V [[gnu::vector_size(8)]] = T;
+V f(V x) {
+ return x >> 8 * sizeof(T);
+}
+
+/* { dg-final { scan-assembler {pxor\s+%xmm0,\s+%xmm0} { target { { i?86-*-* x86_64-*-* } && lp64 } } } } */
diff --git a/gcc/testsuite/g++.dg/pr91838.C b/gcc/testsuite/g++.dg/pr91838.C
deleted file mode 100644
index 4dbaef05ce8..00000000000
--- a/gcc/testsuite/g++.dg/pr91838.C
+++ /dev/null
@@ -1,11 +0,0 @@
-/* { dg-do compile } */
-/* { dg-additional-options "-O2" } */
-/* { dg-skip-if "" { *-*-* } {-std=c++98} } */
-
-using T = unsigned char; // or ushort, or uint
-using V [[gnu::vector_size(8)]] = T;
-V f(V x) {
- return x >> 8 * sizeof(T);
-}
-
-/* { dg-final { scan-assembler {pxor\s+%xmm0,\s+%xmm0} { target x86_64-*-* } } } */
More information about the Gcc-cvs
mailing list