> Here is the new patch that I am currently testing with your change and
> incorporating Eric's comment.  I included both test cases but renamed
> yours and put it into gcc.dg/torture.  Does the code in combine.c to
> address Eric's comment look OK to you?
> 
> Steve Ellcey
> steve.ell...@imgtec.com
> 
> 
> 2015-10-21  Steve Ellcey  <sell...@imgtec.com>
>           Andrew Pinski  <apin...@cavium.com>
> 
>       * combine.c (simplify_comparison): Use gen_lowpart_or_truncate instead
>       of gen_lowpart when we had a truncating and.

The patch is OK for mainline if testing succeeded and you remove the obsolete 
last part of the comment:

             Note that in:

             (ne:DI (and:DI (reg:DI 4) (const_int 0xffffffff)) (const_int 0))
             -> (ne:DI (reg:SI 4) (const_int 0))

             unless TRULY_NOOP_TRUNCATION allows it or the register is
             known to hold a value of the required mode the
             transformation is invalid.  */

-- 
Eric Botcazou

Reply via email to