]> git.ipfire.org Git - people/ms/gcc.git/commit
Don't gimple fold ymm-version vblendvpd/vblendvps/vpblendvb w/o TARGET_AVX2
authorliuhongt <hongtao.liu@intel.com>
Mon, 22 Aug 2022 02:41:16 +0000 (10:41 +0800)
committerliuhongt <hongtao.liu@intel.com>
Fri, 26 Aug 2022 01:20:59 +0000 (09:20 +0800)
commit388f1a8cf0851854cc4d2ee99ed85600f0822afc
tree9f0ae83b78b97a107efaa81f5417e8e28c5f3d24
parent5d4389dc913269cc6a6fd6ee38abc78b1fb7dbe8
Don't gimple fold ymm-version vblendvpd/vblendvps/vpblendvb w/o TARGET_AVX2

Since 256-bit vector integer comparison is under TARGET_AVX2,
and gimple folding for vblendvpd/vblendvps/vpblendvb relies on that.
Restrict gimple fold condition to TARGET_AVX2.

gcc/ChangeLog:

PR target/106704
* config/i386/i386-builtin.def (BDESC): Add
CODE_FOR_avx_blendvpd256/CODE_FOR_avx_blendvps256 to
corresponding builtins.
* config/i386/i386.cc (ix86_gimple_fold_builtin):
Don't fold IX86_BUILTIN_PBLENDVB256, IX86_BUILTIN_BLENDVPS256,
IX86_BUILTIN_BLENDVPD256 w/o TARGET_AVX2.

gcc/testsuite/ChangeLog:

* gcc.target/i386/pr106704.c: New test.
gcc/config/i386/i386-builtin.def
gcc/config/i386/i386.cc
gcc/testsuite/gcc.target/i386/pr106704.c [new file with mode: 0644]