This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/85832] [AVX512] possible shorter code when comparing with vector of zeros
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 04 Jun 2018 08:29:24 +0000
- Subject: [Bug target/85832] [AVX512] possible shorter code when comparing with vector of zeros
- Auto-submitted: auto-generated
- References: <bug-85832-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85832
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Actually, vpcmpeq zmmX, zero and vptestm zmmX, zmmX perform exactly the
opposite, not the same thing, as vpcmpeq sets bits in the %kY register if zmmX
element is equal to 0, while vptestm if it is not equal to 0.
So we want to use vptestnm instead.