Re: [PATCH] x86: Compile PR 88465 tests with -mtune=generic
"H.J. Lu" <[email protected]>
| Newsgroups | gmane.comp.gcc.patches |
|---|---|
| Message-ID | <CAMe9rOrUEfsV3YHxgYET7xMM-kPhYtUgwcGTMOcFDrHXZmjDyw@mail.gmail.com> |
On Thu, Aug 20, 2026 at 10:14 AM Liu, Hongtao <[email protected]> wrote: > > > > > -----Original Message----- > > From: H.J. Lu <[email protected]> > > Sent: Thursday, August 20, 2026 9:47 AM > > To: GCC Patches <[email protected]>; Uros Bizjak > > <[email protected]>; Liu, Hongtao <[email protected]> > > Subject: [PATCH] x86: Compile PR 88465 tests with -mtune=generic > > > > Compile PR 88465 tests with -mtune=generic to avoid > > > > FAIL: gcc.target/i386/avx512bw-pr88465.c scan-assembler-times > > kxnor[dq][ \t] 2 > > FAIL: gcc.target/i386/avx512dq-pr88465.c scan-assembler-times kxnorb[ \t] > > 1 > > FAIL: gcc.target/i386/avx512f-pr88465.c scan-assembler-times kxnorw[ \t] 1 > > > > caused by different code sequence from different default cost models. > > It looks like an mis-optimization under tune=znver4, I check -mtune=sapphirerapids is ok. > Assume kxnorb should be fastest way to move -1 to k register, not load it from constant pool. It is due to znver4 cost model. I opened: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126959 But changing znver4 cost model may cause other regressions. > > > > PR testsuite/126923 > > * gcc.target/i386/avx512bw-pr88465.c (dg-options): Add -mtune=generic. > > * gcc.target/i386/avx512dq-pr88465.c (dg-options): Likewise. > > * gcc.target/i386/avx512f-pr88465.c (dg-options): Likewise. > > > > -- > > H.J. -- H.J.