[Bug target/70314] AVX512 not using kandw to combine comparison results

glisse at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Aug 5 15:01:06 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70314

--- Comment #4 from Marc Glisse <glisse at gcc dot gnu.org> ---
We now generate for the original testcase

        vpcmpd  $1, %zmm3, %zmm2, %k1
        vpcmpd  $1, %zmm1, %zmm0, %k0{%k1}
        vpmovm2d        %k0, %zmm0

which looks great.

However, using | instead of &, we get

        vpcmpd  $1, %zmm1, %zmm0, %k0
        vpcmpd  $1, %zmm3, %zmm2, %k1
        kmovw   %k0, %eax
        kmovw   %k1, %edx
        orl     %edx, %eax
        kmovw   %eax, %k2
        vpmovm2d        %k2, %zmm0

Well, at least gimple did what it could, and it is now up to the target to
handle logical operations on bool vectors / k* registers. There is probably
already another bug report about that...


More information about the Gcc-bugs mailing list