diff options
author | Richard Biener <rguenther@suse.de> | 2021-04-15 11:06:09 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2021-04-26 11:04:00 +0200 |
commit | 76da5b8e65aacdfcca73e0e6e0477c8a4ca7d773 (patch) | |
tree | cdc8e265086d51831eb2a06a0d03f84ccbceffc7 /gcc/tree-ssa-phiopt.c | |
parent | 577d05fc914338cd7ddc254f3bee4532331f5c13 (diff) | |
download | gcc-76da5b8e65aacdfcca73e0e6e0477c8a4ca7d773.zip gcc-76da5b8e65aacdfcca73e0e6e0477c8a4ca7d773.tar.gz gcc-76da5b8e65aacdfcca73e0e6e0477c8a4ca7d773.tar.bz2 |
Remove gimplify_buildN API use from phiopt
This removes use of the legacy gimplify_buildN API from phiopt.
2021-04-15 Richard Biener <rguenther@suse.de>
* tree-ssa-phiopt.c (two_value_replacement): Remove use
of legacy gimplify_buildN API.
Diffstat (limited to 'gcc/tree-ssa-phiopt.c')
-rw-r--r-- | gcc/tree-ssa-phiopt.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c index 13e5c497..35ce51e 100644 --- a/gcc/tree-ssa-phiopt.c +++ b/gcc/tree-ssa-phiopt.c @@ -752,16 +752,16 @@ two_value_replacement (basic_block cond_bb, basic_block middle_bb, } tree arg = wide_int_to_tree (type, a); - gimple_stmt_iterator gsi = gsi_for_stmt (stmt); - if (!useless_type_conversion_p (type, TREE_TYPE (lhs))) - lhs = gimplify_build1 (&gsi, NOP_EXPR, type, lhs); + gimple_seq stmts = NULL; + lhs = gimple_convert (&stmts, type, lhs); tree new_rhs; if (code == PLUS_EXPR) - new_rhs = gimplify_build2 (&gsi, PLUS_EXPR, type, lhs, arg); + new_rhs = gimple_build (&stmts, PLUS_EXPR, type, lhs, arg); else - new_rhs = gimplify_build2 (&gsi, MINUS_EXPR, type, arg, lhs); - if (!useless_type_conversion_p (TREE_TYPE (arg0), type)) - new_rhs = gimplify_build1 (&gsi, NOP_EXPR, TREE_TYPE (arg0), new_rhs); + new_rhs = gimple_build (&stmts, MINUS_EXPR, type, arg, lhs); + new_rhs = gimple_convert (&stmts, TREE_TYPE (arg0), new_rhs); + gimple_stmt_iterator gsi = gsi_for_stmt (stmt); + gsi_insert_seq_before (&gsi, stmts, GSI_SAME_STMT); replace_phi_edge_with_variable (cond_bb, e1, phi, new_rhs); |