]> gcc.gnu.org Git - gcc.git/commit
Expand the comparison argument of fold_cond_expr_with_comparison
authorAndrew Pinski <apinski@marvell.com>
Sat, 12 Jun 2021 02:52:30 +0000 (19:52 -0700)
committerAndrew Pinski <apinski@marvell.com>
Sat, 26 Jun 2021 01:47:42 +0000 (18:47 -0700)
commit86fc076dc289f1861adebee02e6afcbaa1a2cdb6
tree71341c3f73196b5754145834d00a607dee38d5c6
parent90708f87b8d13da61f7d5cba7c6597fee0025bb1
Expand the comparison argument of fold_cond_expr_with_comparison

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.
gcc/fold-const.c
This page took 0.060405 seconds and 5 git commands to generate.