testsuite: i386: Fix gcc.target/i386/avx512f-pr96891-3.c on Solaris [PR102834]

Message ID yddzgqx19v8.fsf@CeBiTec.Uni-Bielefeld.DE
State Committed
Commit a1516b50f291e132d76e3dc79ea91148f8713deb
Headers
Series testsuite: i386: Fix gcc.target/i386/avx512f-pr96891-3.c on Solaris [PR102834] |

Commit Message

Rainer Orth Oct. 25, 2021, 2:01 p.m. UTC
  gcc.target/i386/avx512f-pr96891-3.c currently FAILs on 32-bit Solaris/x86:

FAIL: gcc.target/i386/avx512f-pr96891-3.c scan-assembler-times (?n)vpcmp[bwdq][ \\\\t]*\\\\\$7 4

There are only 3 instances of the expected pattern because Solaris/x86
defaults to -mno-stv.  Fixed by compiling with -mstv and
-mno-stackrealign.  Tested on i386-pc-solaris2.11 and
x86_64-pc-linux-gnu.

Ok for master?

	Rainer
  

Comments

Hongtao Liu Oct. 26, 2021, 1:32 a.m. UTC | #1
On Mon, Oct 25, 2021 at 10:01 PM Rainer Orth
<ro@cebitec.uni-bielefeld.de> wrote:
>
> gcc.target/i386/avx512f-pr96891-3.c currently FAILs on 32-bit Solaris/x86:
>
> FAIL: gcc.target/i386/avx512f-pr96891-3.c scan-assembler-times (?n)vpcmp[bwdq][ \\\\t]*\\\\\$7 4
>
> There are only 3 instances of the expected pattern because Solaris/x86
> defaults to -mno-stv.  Fixed by compiling with -mstv and
> -mno-stackrealign.  Tested on i386-pc-solaris2.11 and
> x86_64-pc-linux-gnu.
>
> Ok for master?
Ok.
>
>         Rainer
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
>
>
> 2021-10-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>
>         gcc/testsuite:
>         PR testsuite/102834
>         * gcc.target/i386/avx512f-pr96891-3.c: Add -mstv -mno-stackrealign
>         to dg-options.
>
  

Patch

# HG changeset patch
# Parent  fb0ee6d7c96c44712f6a682a8be50ea3471d73fc
testsuite: i386: Fix gcc.target/i386/avx512f-pr96891-3.c on Solaris [PR102834]

diff --git a/gcc/testsuite/gcc.target/i386/avx512f-pr96891-3.c b/gcc/testsuite/gcc.target/i386/avx512f-pr96891-3.c
--- a/gcc/testsuite/gcc.target/i386/avx512f-pr96891-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-pr96891-3.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-mavx512vl -mavx512bw -mavx512dq -O2 -masm=att" } */
+/* { dg-options "-mavx512vl -mavx512bw -mavx512dq -O2 -masm=att -mstv -mno-stackrealign" } */
 /* { dg-final { scan-assembler-not {not[bwlqd]\]} } } */
 /* { dg-final { scan-assembler-times {(?n)vpcmp[bwdq][ \t]*\$5} 4} } */
 /* { dg-final { scan-assembler-times {(?n)vpcmp[bwdq][ \t]*\$6} 4} } */