Re: [PATCH] x86: Compile some check-function-bodies tests with -mtune=generic

"H.J. Lu" <[email protected]>
Newsgroups gmane.comp.gcc.patches
Message-ID <CAMe9rOpKGKwLe=e8Q4A7k20c43+mdD-B9JH6MPToDZxbQ8wiPw@mail.gmail.com>
On Thu, Aug 20, 2026 at 9:14 AM Liu, Hongtao <[email protected]> wrote:
>
>
>
> > -----Original Message-----
> > From: H.J. Lu <[email protected]>
> > Sent: Thursday, August 20, 2026 7:52 AM
> > To: GCC Patches <[email protected]>; Uros Bizjak
> > <[email protected]>; Liu, Hongtao <[email protected]>
> > Subject: [PATCH] x86: Compile some check-function-bodies tests with -
> > mtune=generic
> >
> > Compile some check-function-bodies tests with -mtune=generic to avoid
> >
> > FAIL: gcc.target/i386/memset-pr120683-10.c check-function-bodies foo
> > FAIL: gcc.target/i386/memset-pr120683-12.c check-function-bodies foo
> > FAIL: gcc.target/i386/pr122343-1b.c check-function-bodies foo
> > FAIL: gcc.target/i386/pr122343-5b.c check-function-bodies foo
> >
> > due to the generated sequence
> >
> > movq $0, 29(%rdi)
> > movq $0, 37(%rdi)
> > movq $0, 45(%rdi)
> > movq $0, 53(%rdi)
> > movq $0, (%rdi)
> > movq $0, 8(%rdi)
> > movq $0, 16(%rdi)
> > movq $0, 24(%rdi)
> >
> > vs the expected sequence
> >
> > movq $0, 48(%rdi)
> > movq $0, (%rdi)
> > movq $0, 8(%rdi)
> > movq $0, 16(%rdi)
> > movq $0, 24(%rdi)
> > movq $0, 32(%rdi)
> > movq $0, 40(%rdi)
> > movq $0, 53(%rdi)
> >
> > when a different tuning is enabled by default.
> Can we check  movq $0, [1-9]*(%rdi), use regex for the disp?

regex won't check random instructions added by some
commits and there are other different code sequences
generated by different default tuning which doesn't work
with regex.

> >
> > PR testsuite/126923
> > * gcc.target/i386/memset-pr120683-10.c (dg-options): Add -mtune=generic.
> > * gcc.target/i386/memset-pr120683-12.c (dg-options): Likewise.
> > * gcc.target/i386/pr122343-1b.c (dg-options): Likewise.
> > * gcc.target/i386/pr122343-1b.c (dg-options): Likewise.
> >
> > --
> > H.J.



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