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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pins...@gcc.gnu.org>:

https://gcc.gnu.org/g:527e54a431473cc497204226a21f2831d2375e66

commit r12-5392-g527e54a431473cc497204226a21f2831d2375e66
Author: Andrew Pinski <apin...@marvell.com>
Date:   Tue Nov 16 04:46:21 2021 +0000

    Fix tree-optimization/103257: Missed jump threading due too early
conversion of bool*A into bool?A:0

    So like many optimizations on the gimple level, sometimes it makes sense to
do the
    optimization early or later. In this case, creating a cond expression early
causes
    other optimizations to be missed.  So just disable it until
canonicalize_math_p ()
    is false.

    OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

            PR tree-optimization/103257

    gcc/ChangeLog:

            * match.pd
            ((m1 >/</>=/<= m2) * d -> (m1 >/</>=/<= m2) ? d : 0):
            Disable until !canonicalize_math_p ().

    gcc/testsuite/ChangeLog:

            * gcc.dg/tree-ssa/vrp116.c: Check optimized instead of vrp1.
            * gcc.dg/tree-ssa/pr103257-1.c: New test.

Reply via email to