[Bug target/98461] Suboptimal codegen for negating a movemask
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Dec 30 10:22:32 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98461
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:8f7941ca37001773a36add8119791725aeb823ba
commit r11-6367-g8f7941ca37001773a36add8119791725aeb823ba
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Dec 30 11:21:24 2020 +0100
i386: Optimize pmovmskb on inverted vector to inversion of pmovmskb result
[PR98461]
The following patch adds combine splitters to optimize:
- vpcmpeqd %ymm1, %ymm1, %ymm1
- vpandn %ymm1, %ymm0, %ymm0
vpmovmskb %ymm0, %eax
+ notl %eax
etc. (for vectors with less than 32 elements with xorl instead of notl).
2020-12-30 Jakub Jelinek <jakub@redhat.com>
PR target/98461
* config/i386/sse.md (<sse2_avx2>_pmovmskb): Add splitters
for pmovmskb of NOT vector.
* gcc.target/i386/sse2-pr98461.c: New test.
* gcc.target/i386/avx2-pr98461.c: New test.
More information about the Gcc-bugs
mailing list