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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:0425f4c1b63107bf3bc4778d1fe53c91ace7838d

commit r11-6739-g0425f4c1b63107bf3bc4778d1fe53c91ace7838d
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Fri Jan 15 21:12:14 2021 +0100

    match.pd: Generalize the PR64309 simplifications [PR96669]

    The following patch generalizes the PR64309 simplifications, so that
instead
    of working only with constants 1 and 1 it works with any two power of two
    constants, and works also for right shift (in that case it rules out the
    first one being negative, as it is arithmetic shift then).

    2021-01-15  Jakub Jelinek  <ja...@redhat.com>

            PR tree-optimization/96669
            * match.pd (((1 << A) & 1) != 0 -> A == 0,
            ((1 << A) & 1) == 0 -> A != 0): Generalize for 1s replaced by
            possibly different power of two constants and to right shift too.

            * gcc.dg/tree-ssa/pr96669-1.c: New test.

Reply via email to