Re: [PATCH] testsuite: Small tweaks for recent test FAILs on ia32

Richard Biener <[email protected]>
Newsgroups gmane.comp.gcc.patches
Message-ID <[email protected]>
On Tue, 18 Aug 2026, Jakub Jelinek wrote:

> Hi!
> 
> I'm seeing various recent FAILs on ia32.
> +FAIL: gcc.dg/tree-ssa/divmul-mod-1.c (test for excess errors)
> +FAIL: gcc.dg/tree-ssa/round-up-ior-1.c (test for excess errors)
> +FAIL: gcc.dg/tree-ssa/vec-mask-zero-1.c (test for excess errors)
> +FAIL: gcc.dg/tree-ssa/vec-mask-zero-1.c scan-tree-dump-times optimized " != " 2
> +FAIL: gcc.dg/tree-ssa/vec-mask-zero-1.c scan-tree-dump-times optimized " & " 2
> +FAIL: gcc.dg/tree-ssa/vec-mask-zero-1.c scan-tree-dump-times optimized " == " 2
> +FAIL: gcc.dg/tree-ssa/vec-mask-zero-1.c scan-tree-dump-times optimized " \\\\| " 2
> +FAIL: gcc.dg/tree-ssa/vector-alignup-1.c (test for excess errors)
> +FAIL: gcc.dg/tree-ssa/vector-alignup-1.c scan-tree-dump-times optimized " & " 2
> +FAIL: gcc.dg/tree-ssa/vector-alignup-1.c scan-tree-dump-times optimized " \\\\+ " 2
> +FAIL: g++.dg/tree-ssa/vec-narrow-1.C  -std=gnu++11  scan-tree-dump-not optimized "vector\\\\(2\\\\) long"
> +FAIL: g++.dg/tree-ssa/vec-narrow-1.C  -std=gnu++14  scan-tree-dump-not optimized "vector\\\\(2\\\\) long"
> +FAIL: g++.dg/tree-ssa/vec-narrow-1.C  -std=gnu++17  scan-tree-dump-not optimized "vector\\\\(2\\\\) long"
> +FAIL: g++.dg/tree-ssa/vec-narrow-1.C  -std=gnu++20  scan-tree-dump-not optimized "vector\\\\(2\\\\) long"
> +FAIL: g++.dg/tree-ssa/vec-narrow-1.C  -std=gnu++23  scan-tree-dump-not optimized "vector\\\\(2\\\\) long"
> +FAIL: g++.dg/tree-ssa/vec-narrow-1.C  -std=gnu++26  scan-tree-dump-not optimized "vector\\\\(2\\\\) long"
> +FAIL: g++.dg/tree-ssa/vec-narrow-1.C  -std=gnu++29  scan-tree-dump-not optimized "vector\\\\(2\\\\) long"
> +FAIL: g++.dg/tree-ssa/vec-narrow-1.C  -std=gnu++98  scan-tree-dump-not optimized "vector\\\\(2\\\\) long"
> +FAIL: g++.dg/tree-ssa/vec-narrow-minmax-2.C  -std=gnu++11  scan-tree-dump-times optimized "MIN_EXPR" 1
> +FAIL: g++.dg/tree-ssa/vec-narrow-minmax-2.C  -std=gnu++11 (test for excess errors)
> +FAIL: g++.dg/tree-ssa/vec-narrow-minmax-2.C  -std=gnu++14  scan-tree-dump-times optimized "MIN_EXPR" 1
> +FAIL: g++.dg/tree-ssa/vec-narrow-minmax-2.C  -std=gnu++14 (test for excess errors)
> +FAIL: g++.dg/tree-ssa/vec-narrow-minmax-2.C  -std=gnu++17  scan-tree-dump-times optimized "MIN_EXPR" 1
> +FAIL: g++.dg/tree-ssa/vec-narrow-minmax-2.C  -std=gnu++17 (test for excess errors)
> +FAIL: g++.dg/tree-ssa/vec-narrow-minmax-2.C  -std=gnu++20  scan-tree-dump-times optimized "MIN_EXPR" 1
> +FAIL: g++.dg/tree-ssa/vec-narrow-minmax-2.C  -std=gnu++20 (test for excess errors)
> +FAIL: g++.dg/tree-ssa/vec-narrow-minmax-2.C  -std=gnu++23  scan-tree-dump-times optimized "MIN_EXPR" 1
> +FAIL: g++.dg/tree-ssa/vec-narrow-minmax-2.C  -std=gnu++23 (test for excess errors)
> +FAIL: g++.dg/tree-ssa/vec-narrow-minmax-2.C  -std=gnu++26  scan-tree-dump-times optimized "MIN_EXPR" 1
> +FAIL: g++.dg/tree-ssa/vec-narrow-minmax-2.C  -std=gnu++26 (test for excess errors)
> +FAIL: g++.dg/tree-ssa/vec-narrow-minmax-2.C  -std=gnu++29  scan-tree-dump-times optimized "MIN_EXPR" 1
> +FAIL: g++.dg/tree-ssa/vec-narrow-minmax-2.C  -std=gnu++29 (test for excess errors)
> +FAIL: g++.dg/tree-ssa/vec-narrow-minmax-2.C  -std=gnu++98  scan-tree-dump-times optimized "MIN_EXPR" 1
> +FAIL: g++.dg/tree-ssa/vec-narrow-minmax-2.C  -std=gnu++98 (test for excess errors)
> The following patch fixes the gcc.dg ones and the excess errors in
> vec-narrow-minmax-2.C.
> vec-narrow-1.C still fails on ia32, dunno why (added at least -mmmx but it
> didn't help, unlike x86_64 ia32 doesn't emulate MMX sized vectors in SSE2),
> and the MIN_EXPR scans fail before/after on both x86_64 and ia32.
> 
> Tested on x86_64-linux with
> GXX_TESTSUITE_STDS=98,11,14,17,20,23,26,29 make check-gcc check-g++ RUNTESTFLAGS="--target_board=unix\{-m64,-m32,-m32/-mno-sse/-mno-mmx\} tree-ssa.exp='divmul-mod-1.c round-up-ior-1.c vec-mask-zero-1.c vector-alignup-1.c' dg.exp='vec-narrow-minmax-2.C vec-narrow-1.C'"
> Ok for trunk?

OK.

Richard.

> 2026-08-18  Jakub Jelinek  <[email protected]>
> 
> 	* gcc.dg/tree-ssa/divmul-mod-1.c: Add -Wno-psabi to dg-options.
> 	* gcc.dg/tree-ssa/round-up-ior-1.c: Likewise.
> 	* gcc.dg/tree-ssa/vec-mask-zero-1.c: Require vect_int effective
> 	target.  Add -Wno-psabi to dg-options and add -msse2 as
> 	dg-additional-options on ia32.
> 	* gcc.dg/tree-ssa/vector-alignup-1.c: Add -msse2 as
> 	dg-additional-options on ia32.
> 	* g++.dg/tree-ssa/vec-narrow-minmax-2.C: Add -Wno-psabi to dg-options.
> 	* g++.dg/tree-ssa/vec-narrow-1.C: Likewise. Add -mmmx as
> 	dg-additional-options on ia32.
> 
> --- gcc/testsuite/gcc.dg/tree-ssa/divmul-mod-1.c.jj	2026-08-17 10:00:21.910853874 +0200
> +++ gcc/testsuite/gcc.dg/tree-ssa/divmul-mod-1.c	2026-08-18 09:04:09.860550950 +0200
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-O2 -fdump-tree-optimized" } */
> +/* { dg-options "-O2 -fdump-tree-optimized -Wno-psabi" } */
>  
>  typedef int v4si __attribute__ ((vector_size (16)));
>  typedef unsigned int v4ui __attribute__ ((vector_size (16)));
> --- gcc/testsuite/gcc.dg/tree-ssa/round-up-ior-1.c.jj	2026-08-17 10:00:21.911853861 +0200
> +++ gcc/testsuite/gcc.dg/tree-ssa/round-up-ior-1.c	2026-08-18 09:04:27.078324715 +0200
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-O2 -fdump-tree-optimized" } */
> +/* { dg-options "-O2 -fdump-tree-optimized -Wno-psabi" } */
>  
>  typedef unsigned int v4ui __attribute__ ((vector_size (16)));
>  
> --- gcc/testsuite/gcc.dg/tree-ssa/vec-mask-zero-1.c.jj	2026-08-17 10:00:21.911853861 +0200
> +++ gcc/testsuite/gcc.dg/tree-ssa/vec-mask-zero-1.c	2026-08-18 09:13:52.013896106 +0200
> @@ -1,5 +1,6 @@
> -/* { dg-do compile } */
> -/* { dg-options "-O2 -fdump-tree-optimized" } */
> +/* { dg-do compile { target vect_int } } */
> +/* { dg-options "-O2 -fdump-tree-optimized -Wno-psabi" } */
> +/* { dg-additional-options "-msse2" { target ia32 } } */
>  /* Combine pairs of vector comparisons against zero or all-ones.  Use
>     different signedness for the operands to exercise the view conversion.  */
>  typedef int v4si __attribute__((vector_size (16)));
> --- gcc/testsuite/gcc.dg/tree-ssa/vector-alignup-1.c.jj	2026-08-06 17:46:47.582463890 +0200
> +++ gcc/testsuite/gcc.dg/tree-ssa/vector-alignup-1.c	2026-08-18 09:09:39.285220615 +0200
> @@ -1,6 +1,7 @@
>  /* { dg-do compile } */
>  /* { dg-require-effective-target vect_int } */
>  /* { dg-options "-O2 -fdump-tree-optimized" } */
> +/* { dg-additional-options "-msse2" { target ia32 } } */
>  
>  /* Rounding up by adding the padding, spelled with vectors.  */
>  
> --- gcc/testsuite/g++.dg/tree-ssa/vec-narrow-minmax-2.C.jj	2026-08-17 10:00:21.908853899 +0200
> +++ gcc/testsuite/g++.dg/tree-ssa/vec-narrow-minmax-2.C	2026-08-18 09:14:45.021198826 +0200
> @@ -1,5 +1,5 @@
>  // { dg-do compile }
> -// { dg-options "-O2 -fdump-tree-optimized" }
> +// { dg-options "-O2 -fdump-tree-optimized -Wno-psabi" }
>  
>  typedef int v2si __attribute__((vector_size (8)));
>  typedef long long v2di __attribute__((vector_size (16)));
> --- gcc/testsuite/g++.dg/tree-ssa/vec-narrow-1.C.jj	2026-08-17 10:00:21.908853899 +0200
> +++ gcc/testsuite/g++.dg/tree-ssa/vec-narrow-1.C	2026-08-18 09:11:57.800398527 +0200
> @@ -1,6 +1,7 @@
>  // { dg-do compile }
> -// { dg-options "-O2 -fdump-tree-optimized" }
> +// { dg-options "-O2 -fdump-tree-optimized -Wno-psabi" }
>  // { dg-additional-options "-mavx512vl -mavx512dq" { target { i?86-*-* x86_64-*-* } } }
> +// { dg-additional-options "-mmmx" { target ia32 } }
>  // Extension is monotone, so it commutes with the comparison and the outer
>  // truncation is exact.  The argument is lanewise, so a widened vector
>  // MIN/MAX feeding a truncating conversion narrows.
> 
> 	Jakub
> 
> 

-- 
Richard Biener <[email protected]>
SUSE Software Solutions Germany GmbH,
Frankenstrasse 146, 90461 Nuernberg, Germany;
GF: Jochen Jaser, Andrew McDonald, Abhinav Puri; (HRB 36809, AG Nuernberg)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.