On Thu, 31 Aug 2023, Jiang, Haochen wrote:

> On Linux/x86_64,
> 
> caa7a99a052929d5970677c5b639e1fa5166e334 is the first bad commit
> commit caa7a99a052929d5970677c5b639e1fa5166e334
> Author: Richard Biener <rguent...@suse.de>
> Date:   Wed Aug 30 11:57:47 2023 +0200
> 
>     tree-optimization/111228 - combine two VEC_PERM_EXPRs
> 
> caused
> 
> FAIL: gcc.target/i386/pr52252-atom.c scan-assembler palignr
> 
> with GCC configured with
> 
> ../../gcc/configure 
> --prefix=/export/users/haochenj/src/gcc-bisect/master/master/r14-3571/usr 
> --enable-clocale=gnu --with-system-zlib --with-demangler-in-ld 
> --with-fpmath=sse --enable-languages=c,c++,fortran --enable-cet --without-isl 
> --enable-libmpx x86_64-linux --disable-bootstrap
> 
> To reproduce:
> 
> $ cd {build_dir}/gcc && make check 
> RUNTESTFLAGS="i386.exp=gcc.target/i386/pr52252-atom.c 
> --target_board='unix{-m32\ -march=cascadelake}'"
> $ cd {build_dir}/gcc && make check 
> RUNTESTFLAGS="i386.exp=gcc.target/i386/pr52252-atom.c 
> --target_board='unix{-m64\ -march=cascadelake}'"
> 
> (For question about this report, contact me at haochen dot jiang at 
> intel.com.)
> (If you met problems with cascadelake related, disabling AVX512F in command 
> line might save that.)
> (However, please make sure that there is no potential problems with AVX512.)

We are eliding 6 permutations on the testcase with the change.  The
testcase in question gcc.target/i386/pr52252-atom.c, doesn't expect
to have AVX512 enabled.

I wonder why -mtune=slm doesn't enable -mprefer-vector-width=128,
when I add that the testcase will pass again.


I'm pushing the following, tested on x86_64-unknown-linux-gnu.

Richard

>From 2d24c1715a096cd069e1627864cdcbba908c807c Mon Sep 17 00:00:00 2001
From: Richard Biener <rguent...@suse.de>
Date: Thu, 31 Aug 2023 09:06:24 +0200
Subject: [PATCH] Adjust gcc.target/i386/pr52252-{atom,core}.c
To: gcc-patches@gcc.gnu.org

The following adjusts the testcases to force 128bit vectorization
to make them more robust when for example adding -march=cascadelake

        * gcc.target/i386/pr52252-atom.c: Add -mprefer-vector-width=128.
        * gcc.target/i386/pr52252-core.c: Likewise.
---
 gcc/testsuite/gcc.target/i386/pr52252-atom.c | 2 +-
 gcc/testsuite/gcc.target/i386/pr52252-core.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.target/i386/pr52252-atom.c 
b/gcc/testsuite/gcc.target/i386/pr52252-atom.c
index ee604f2189a..11f94411575 100644
--- a/gcc/testsuite/gcc.target/i386/pr52252-atom.c
+++ b/gcc/testsuite/gcc.target/i386/pr52252-atom.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -ftree-vectorize -mssse3 -mtune=slm" } */
+/* { dg-options "-O2 -ftree-vectorize -mssse3 -mtune=slm 
-mprefer-vector-width=128" } */
 #define byte unsigned char
 
 void
diff --git a/gcc/testsuite/gcc.target/i386/pr52252-core.c 
b/gcc/testsuite/gcc.target/i386/pr52252-core.c
index 65d62cfa365..897026b0997 100644
--- a/gcc/testsuite/gcc.target/i386/pr52252-core.c
+++ b/gcc/testsuite/gcc.target/i386/pr52252-core.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -ftree-vectorize -mssse3 -mtune=corei7" } */
+/* { dg-options "-O2 -ftree-vectorize -mssse3 -mtune=corei7 
-mprefer-vector-width=128" } */
 #define byte unsigned char
 
 void
-- 
2.35.3

Reply via email to