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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <h...@gcc.gnu.org>:

https://gcc.gnu.org/g:4f73bf20d9c0ad1cd143db39d73f70841dcc1471

commit r11-2852-g4f73bf20d9c0ad1cd143db39d73f70841dcc1471
Author: H.J. Lu <hjl.to...@gmail.com>
Date:   Fri Jun 26 14:56:40 2020 -0700

    x86: Change CTZ_DEFINED_VALUE_AT_ZERO to return 0/2

    Change CTZ_DEFINED_VALUE_AT_ZERO/CTZ_DEFINED_VALUE_AT_ZERO to return 0/2
    to enable table-based clz/ctz optimization:

     -- Macro: CLZ_DEFINED_VALUE_AT_ZERO (MODE, VALUE)
     -- Macro: CTZ_DEFINED_VALUE_AT_ZERO (MODE, VALUE)
         A C expression that indicates whether the architecture defines a
         value for 'clz' or 'ctz' with a zero operand.  A result of '0'
         indicates the value is undefined.  If the value is defined for only
         the RTL expression, the macro should evaluate to '1'; if the value
         applies also to the corresponding optab entry (which is normally
         the case if it expands directly into the corresponding RTL), then
         the macro should evaluate to '2'.  In the cases where the value is
         defined, VALUE should be set to this value.

    gcc/

            PR target/95863
            * config/i386/i386.h (CTZ_DEFINED_VALUE_AT_ZERO): Return 0/2.
            (CLZ_DEFINED_VALUE_AT_ZERO): Likewise.

    gcc/testsuite/

            PR target/95863
            * gcc.target/i386/pr95863-1.c: New test.
            * gcc.target/i386/pr95863-2.c: Likewise.

Reply via email to