Re: [PATCH v5] x86_64: Update overconstrained x86_64 tests

"H.J. Lu via Gcc-regression" <[email protected]>
Newsgroups gmane.comp.gcc.regression,gmane.comp.gcc.patches
Message-ID <CAMe9rOoUe8oCwM==0FUaXXwLj_RneiUxhetCrE+BVC0r1zzp6Q@mail.gmail.com>
On Thu, Aug 6, 2026 at 4:37 PM Dylan Rees <[email protected]> wrote:
>
> 'pr81501-9b.c' contains check-function-bodies directive
> which breaks down as a result of a CSE change. The explicit
> ordering has been removed and the test now checks for the
> components of the original check-function-bodies in any order.
>
> 'pr124407-1.c' was failing due to over constrained scan-rtl-dump
> regexs. The pattern has been expanded to accomodate an equivalent
> representation which has come about as a result of the CSE changes.
>
> gcc/testsuite/ChangeLog:
>
>         * gcc.target/i386/pr124407-1.c: Removed x86_cse rtl flag
>         and scans. Replaced with assembly scan for specific
>         'movabsq' instruction.
>         * gcc.target/i386/pr81501-9b.c: Removed check-function-bodies
>         and replaced with orderless assembly scans.
>
> Change-Id: I5694e2277662adfab13def143a921ec7b3118211
> ---
>  gcc/testsuite/gcc.target/i386/pr124407-1.c |  5 ++---
>  gcc/testsuite/gcc.target/i386/pr81501-9b.c | 15 +--------------
>  2 files changed, 3 insertions(+), 17 deletions(-)
>
> diff --git a/gcc/testsuite/gcc.target/i386/pr124407-1.c b/gcc/testsuite/gcc.target/i386/pr124407-1.c
> index e8fb0dd7872..955ee1b3e2d 100644
> --- a/gcc/testsuite/gcc.target/i386/pr124407-1.c
> +++ b/gcc/testsuite/gcc.target/i386/pr124407-1.c
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-Ofast -msse2 -fdump-rtl-x86_cse" } */
> +/* { dg-options "-Ofast -msse2" } */
>
>  typedef __attribute__((__vector_size__(8))) float V;
>  V v;
> @@ -14,5 +14,4 @@ foo()
>    v /= f;
>  }
>
> -/* { dg-final { scan-rtl-dump {\(set \(reg:V16QI 125\)} "x86_cse" { target { ! ia32 } } } } */
> -/* { dg-final { scan-rtl-dump {\(const_int 0 \[0\]\) repeated x16} "x86_cse" { target { ! ia32 } } } } */
> +/* { dg-final { scan-assembler-times {movabsq[ \t]+\$4575657222473777152,[ \t]+%rax} 1 { target { ! ia32 } } } } */
> diff --git a/gcc/testsuite/gcc.target/i386/pr81501-9b.c b/gcc/testsuite/gcc.target/i386/pr81501-9b.c
> index bd1b65d3e87..ffe40f9b373 100644
> --- a/gcc/testsuite/gcc.target/i386/pr81501-9b.c
> +++ b/gcc/testsuite/gcc.target/i386/pr81501-9b.c
> @@ -1,22 +1,9 @@
>  /* { dg-do compile { target *-*-linux* } } */
>  /* { dg-options "-O2 -march=x86-64-v4 -fpic -fplt -mtls-dialect=gnu2" } */
>  /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
> -/* { dg-final { check-function-bodies "**" "" "" { target { ! ia32 } } {^\t?\.} } } */
> -/* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
> -
> -/*
> -**foo:
> -**.LFB[0-9]+:
> -**...
> -**     vpbroadcastb    %(edi|r\d+d), %zmm\d
> -**...
> -**     lea(l|q)        var@TLSDESC\(%rip\), %(e|r)ax
> -**...
> -**     call    \*var@TLSCALL\(%(e|r)ax\)
> -**...
> -*/
>
>  #include "pr81501-9a.c"
>
>  /* { dg-final { scan-assembler-times "vpbroadcastb" 1 } } */
> +/* { dg-final { scan-assembler-times {lea(l|q)[ \t]+var@TLSDESC\(%rip\), %(e|r)ax} 1 { target { ! ia32 } } } } */
>  /* { dg-final { scan-assembler-times "call\[ \t\]\\*var@TLSCALL\\(%(?:r|e)ax\\)" 1 { target { ! ia32 } } } } */
> --
> 2.43.0
>

LGTM.

Thanks.

-- 
H.J.
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.