On Mon, 2020-07-13 at 06:42 -0700, H.J. Lu via Gcc-patches wrote:
> 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.
OK
jeff
> 

Reply via email to