[Bug target/103661] __builtin_cpu_supports returns a negative integer for avx512vbmi2

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Dec 16 13:03:40 GMT 2021


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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Martin Liska
<marxin@gcc.gnu.org>:

https://gcc.gnu.org/g:a2af3581cba0e7fa662bd8bed7e3b90451ef6a94

commit r10-10341-ga2af3581cba0e7fa662bd8bed7e3b90451ef6a94
Author: Martin Liska <mliska@suse.cz>
Date:   Mon Dec 13 15:34:30 2021 +0100

    i386: Fix emissing of __builtin_cpu_supports.

            PR target/103661

    gcc/ChangeLog:

            * config/i386/i386-builtins.c (fold_builtin_cpu): Compare to 0
            as API expects that non-zero values are returned (do that
            it mask == 31).
            For "avx512vbmi2" argument, we return now 1 << 31, which is a
            negative integer value.

    (cherry picked from commit 127c7178d5ec502d95862fd823537cbca1a0cb99)


More information about the Gcc-bugs mailing list