ae2b8ede40
As mentioned in the PR and as https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mask_popcnt_epi also documents, _mm*_popcnt_epi* intrinsics are consistent with all other unary AVX512* intrinsics regarding arguments, i.e. the _mm*_whatever has just single argument (called a in the docs, and __A in the GCC headers), _mm*_mask_whatever has 3 arguments (called src, k, a in the docs and _W, __U, __A in GCC headers) and _mm*_maskz_whatever 2 arguments (called k, a in the docs and __U, __A in GCC headers). Unfortunately, whomever implemented the _mm*_popcnt_epi* intrinsics got it wrong for the _mm*_mask_popcnt_epi* ones, calling the args __A, __U, __B and not passing them in the canonical order to the builtins, making it API incompatible with ICC as well as clang (tested on godbolts clang 7/8/9/trunk and ICC 19.0.{0,1}, older clang/ICC don't understand those, so it isn't that it used to be broken even in other compilers and got changed afterwards). 2020-02-13 Jakub Jelinek <jakub@redhat.com> PR target/93696 * config/i386/avx512bitalgintrin.h (_mm512_mask_popcnt_epi8, _mm512_mask_popcnt_epi16, _mm256_mask_popcnt_epi8, _mm256_mask_popcnt_epi16, _mm_mask_popcnt_epi8, _mm_mask_popcnt_epi16): Rename __B argument to __A and __A to __W, pass __A to the builtin followed by __W instead of __A followed by __B. * config/i386/avx512vpopcntdqintrin.h (_mm512_mask_popcnt_epi32, _mm512_mask_popcnt_epi64): Likewise. * config/i386/avx512vpopcntdqvlintrin.h (_mm_mask_popcnt_epi32, _mm256_mask_popcnt_epi32, _mm_mask_popcnt_epi64, _mm256_mask_popcnt_epi64): Likewise. * gcc.target/i386/pr93696-1.c: New test. * gcc.target/i386/pr93696-2.c: New test. * gcc.target/i386/avx512bitalg-vpopcntw-1.c (TEST): Fix argument order of _mm*_mask_popcnt_*. * gcc.target/i386/avx512vpopcntdq-vpopcntq-1.c (TEST): Likewise. * gcc.target/i386/avx512vpopcntdq-vpopcntd-1.c (TEST): Likewise. * gcc.target/i386/avx512bitalg-vpopcntb-1.c (TEST): Likewise. * gcc.target/i386/avx512bitalg-vpopcntb.c (foo): Likewise. * gcc.target/i386/avx512bitalg-vpopcntbvl.c (foo): Likewise. * gcc.target/i386/avx512vpopcntdq-vpopcntd.c (foo): Likewise. * gcc.target/i386/avx512bitalg-vpopcntwvl.c (foo): Likewise. * gcc.target/i386/avx512bitalg-vpopcntw.c (foo): Likewise. * gcc.target/i386/avx512vpopcntdq-vpopcntq.c (foo): Likewise. |
||
---|---|---|
config | ||
contrib | ||
fixincludes | ||
gcc | ||
gnattools | ||
gotools | ||
include | ||
INSTALL | ||
intl | ||
libada | ||
libatomic | ||
libbacktrace | ||
libcc1 | ||
libcpp | ||
libdecnumber | ||
libffi | ||
libgcc | ||
libgfortran | ||
libgo | ||
libgomp | ||
libhsail-rt | ||
libiberty | ||
libitm | ||
libobjc | ||
liboffloadmic | ||
libphobos | ||
libquadmath | ||
libsanitizer | ||
libssp | ||
libstdc++-v3 | ||
libvtv | ||
lto-plugin | ||
maintainer-scripts | ||
zlib | ||
.dir-locals.el | ||
.gitattributes | ||
.gitignore | ||
ABOUT-NLS | ||
ar-lib | ||
ChangeLog | ||
ChangeLog.jit | ||
ChangeLog.tree-ssa | ||
compile | ||
config-ml.in | ||
config.guess | ||
config.rpath | ||
config.sub | ||
configure | ||
configure.ac | ||
COPYING | ||
COPYING3 | ||
COPYING3.LIB | ||
COPYING.LIB | ||
COPYING.RUNTIME | ||
depcomp | ||
install-sh | ||
libtool-ldflags | ||
libtool.m4 | ||
lt~obsolete.m4 | ||
ltgcc.m4 | ||
ltmain.sh | ||
ltoptions.m4 | ||
ltsugar.m4 | ||
ltversion.m4 | ||
MAINTAINERS | ||
Makefile.def | ||
Makefile.in | ||
Makefile.tpl | ||
missing | ||
mkdep | ||
mkinstalldirs | ||
move-if-change | ||
multilib.am | ||
README | ||
symlink-tree | ||
test-driver | ||
ylwrap |
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.