> -----Original Message----- > From: Uros Bizjak <ubiz...@gmail.com> > Sent: Tuesday, May 21, 2024 9:04 PM > To: Jiang, Haochen <haochen.ji...@intel.com> > Cc: gcc-patches@gcc.gnu.org; Liu, Hongtao <hongtao....@intel.com> > Subject: Re: [PATCH v3] i386: Disable ix86_expand_vecop_qihi2 > when !TARGET_AVX512BW > > On Tue, May 21, 2024 at 11:01 AM Haochen Jiang > <haochen.ji...@intel.com> wrote: > > > > Hi all, > > > > This is the v3 patch to fix PR115069. The new testcase has passed. > > > > Changes in v3: > > - Simplify the testcase. > > > > Changes in v2: > > - Add a testcase. > > - Change the comment for the early exit. > > > > Thx, > > Haochen > > > > Since vpermq is really slow, we should avoid using it for permutation > > when vpmovwb is not available (needs AVX512BW) for > ix86_expand_vecop_qihi2 > > and fall back to ix86_expand_vecop_qihi. > > > > gcc/ChangeLog: > > > > PR target/115069 > > * config/i386/i386-expand.cc (ix86_expand_vecop_qihi2): > > Do not enable the optimization when AVX512BW is not enabled. > > > > gcc/testsuite/ChangeLog: > > > > PR target/115069 > > * gcc.target/i386/pr115069.c: New. > > LGTM, with a nit below.
Ok and I will also backport the patch to GCC14. Thx, Haochen > > Thanks, > Uros.