On Wed, 2020-03-04 at 08:39 +0000, Yangfei (Felix) wrote:
> Hi,
> 
>   This is a simple fix for PR94026.  
>   With this fix, combine will try make an extraction if we are in a equality
> comparison and this is an AND
>   with a constant which is power of two minus one.  Shift here should be an
> constant.  For example, combine
>   will transform (compare (and (lshiftrt x 8) 6) 0) to (compare (zero_extract
> (x 2 9)) 0).  
> 
>   Added one test case for this.  Bootstrap and tested on both x86_64 and
> aarch64 Linux platform.  
>   Any suggestion?  
> 
> Thanks,
> Felix
> 
> gcc:
> +2020-03-04  Felix Yang  <felix.y...@huawei.com>
> +
> +       PR rtl-optimization/94026
> +       * combine.c (make_compound_operation_int): Make an extraction
> +         if we are in a equality comparison and this is an AND with a
> +         constant which is power of two minus one.
> +
> 
> gcc/testsuite:
> +2020-03-04  Felix Yang  <felix.y...@huawei.com>
> +
> +       PR rtl-optimization/94026
> +       * gcc.dg/pr94026.c: New test.
Just a note.  We're in stage4 of our development cycle, meaning we focus on
regression bugfixes.  I've queued this for evaluation in gcc-11.
jeff

Reply via email to