RE: [PATCH] x86: Compile some check-function-bodies tests with -mtune=generic
"Liu, Hongtao" <[email protected]>
| Newsgroups | gmane.comp.gcc.patches |
|---|---|
| Message-ID | <DS4PPF240F42FB7D772D0BE420BF5A8D6C1E5A42@DS4PPF240F42FB7.namprd11.prod.outlook.com> |
> -----Original Message----- > From: H.J. Lu <[email protected]> > Sent: Thursday, August 20, 2026 9:28 AM > To: Liu, Hongtao <[email protected]> > Cc: GCC Patches <[email protected]>; Uros Bizjak > <[email protected]> > Subject: Re: [PATCH] x86: Compile some check-function-bodies tests with - > mtune=generic > > 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. I c, the patch LGTM. > > > > > > > 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.