diff mbox series

[committed] testsuite: Add -Wno-psabi to vshuf-mem.C test

Message ID ZmyF8M4N+6B6wT/S@tucnak
State New
Headers show
Series [committed] testsuite: Add -Wno-psabi to vshuf-mem.C test | expand

Commit Message

Jakub Jelinek June 14, 2024, 6:03 p.m. UTC
On Mon, Jun 10, 2024 at 10:06:31AM +0200, Andreas Krebbel wrote:
> The current implementation assumes to always be invoked with register
> operands. For memory operands we even have an instruction
> though (vlrep). With the patch we try this first and only if it fails
> force the input into a register and continue.
> 
> vec_splats generation fails for single element 128bit types which are
> allowed for vec_splat. This is something to sort out with another
> patch I guess.
> 
> Bootstrapped and regtested on IBM Z. Committed to mainline. Needs to
> be committed to GCC 14 branch as well.

The newly added test FAILs on i686-linux.
On x86_64-linux
make check-g++ RUNTESTFLAGS='--target_board=unix\{-m64,-m32/-msse2,-m32/-mno-sse/-mno-mmx\} dg-torture.exp=vshuf-mem.C'
shows that as well.

The problem is that without SSE2/MMX the vector is passed differently
than normally and so GCC warns about that.
-Wno-psabi is the usual way to shut it up.

Also wonder about the
// { dg-additional-options "-march=z14" { target s390*-*-* } }
line, doesn't that mean the test will FAIL on all pre-z14 HW?
Shouldn't it use some z14_runtime or similar effective target, or
check in main (in that case copied over to g++.target/s390) whether
z14 instructions can be actually used at runtime?

Tested on x86_64-linux, committed to trunk as obvious.

2024-06-14  Jakub Jelinek  <jakub@redhat.com>

	* g++.dg/torture/vshuf-mem.C: Add -Wno-psabi to dg-options.



	Jakub

Comments

Andreas Krebbel June 17, 2024, 7:09 p.m. UTC | #1
On 6/14/24 20:03, Jakub Jelinek wrote:
> Also wonder about the
> // { dg-additional-options "-march=z14" { target s390*-*-* } }
> line, doesn't that mean the test will FAIL on all pre-z14 HW?
> Shouldn't it use some z14_runtime or similar effective target, or
> check in main (in that case copied over to g++.target/s390) whether
> z14 instructions can be actually used at runtime?

Oh right. I'll remove that line and replicate the testcase in the arch 
specific test dir.

Andreas
Jakub Jelinek June 17, 2024, 7:17 p.m. UTC | #2
On Mon, Jun 17, 2024 at 09:09:37PM +0200, Andreas Krebbel wrote:
> On 6/14/24 20:03, Jakub Jelinek wrote:
> > Also wonder about the
> > // { dg-additional-options "-march=z14" { target s390*-*-* } }
> > line, doesn't that mean the test will FAIL on all pre-z14 HW?
> > Shouldn't it use some z14_runtime or similar effective target, or
> > check in main (in that case copied over to g++.target/s390) whether
> > z14 instructions can be actually used at runtime?
> 
> Oh right. I'll remove that line and replicate the testcase in the arch
> specific test dir.

Though, looking around some more, perhaps
// { dg-additional-options "-march=z14" { target s390_vxe } }
might be all that is needed, even in current dir.

	Jakub
diff mbox series

Patch

--- gcc/testsuite/g++.dg/torture/vshuf-mem.C.jj	2024-06-14 19:45:09.116781920 +0200
+++ gcc/testsuite/g++.dg/torture/vshuf-mem.C	2024-06-14 19:56:08.744135867 +0200
@@ -1,4 +1,4 @@ 
-// { dg-options "-std=c++11" }
+// { dg-options "-std=c++11 -Wno-psabi" }
 // { dg-do run }
 // { dg-additional-options "-march=z14" { target s390*-*-* } }