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

--- Comment #38 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>:

https://gcc.gnu.org/g:c9954996cd647daf0ba03e34dd279b97982f671f

commit r13-6923-gc9954996cd647daf0ba03e34dd279b97982f671f
Author: Richard Biener <rguent...@suse.de>
Date:   Tue Mar 28 15:20:22 2023 +0200

    tree-optimization/109154 - improve if-conversion for vectorization

    With multi-argument PHIs and now doing VN on the if-converted blocks
    the optimization of CSEing condition and negated condition doesn't
    work well anymore.  The following restores this a little bit for
    the case of a single inverted condition into a COND_EXPR where
    we can instead swap the COND_EXPR arms.  The same optimization
    is already done for the case of two-argument PHIs.

    This avoids one comparison/mask for the testcase at hand.

            PR tree-optimization/109154
            * tree-if-conv.cc (gen_phi_arg_condition): Handle single
            inverted condition specially by inverting at the caller.
            (gen_phi_arg_condition): Swap COND_EXPR arms if requested.

Reply via email to