On 6/23/2021 4:19 PM, apinski--- via Gcc-patches wrote:
From: Andrew Pinski <apin...@marvell.com>

To make things slightly easiler to convert fold_cond_expr_with_comparison
over to match.pd, expanding the arg0 argument into 3 different arguments
is done. Also this was simple because we don't use arg0 after grabbing
the code and the two operands.
Also since we do this, we don't need to fold the comparison to
get the inverse but just use invert_tree_comparison directly.

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

gcc/ChangeLog:

        * fold-const.c (fold_cond_expr_with_comparison):
        Exand arg0 into comp_code, arg00, and arg01.
        (fold_ternary_loc): Use invert_tree_comparison
        instead of fold_invert_truthvalue for the case
        where we have A CMP B ? C : A.
OK
jeff

Reply via email to