aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-niter.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2021-07-16 12:02:25 +0200
committerRichard Biener <rguenther@suse.de>2021-07-16 12:52:17 +0200
commitce777eaedfdc55850b429f97b2093f2de5da09de (patch)
tree56ea1a168ac8a25522d06c78c4237b85dc1d3864 /gcc/tree-ssa-loop-niter.c
parent0990d93dd8a4268bff5bbe48aa26748cf63201c7 (diff)
downloadgcc-ce777eaedfdc55850b429f97b2093f2de5da09de.zip
gcc-ce777eaedfdc55850b429f97b2093f2de5da09de.tar.gz
gcc-ce777eaedfdc55850b429f97b2093f2de5da09de.tar.bz2
Get rid of some gimple_expr_type uses
This gets rid of a few gimple_expr_type uses. 2021-07-16 Richard Biener <rguenther@suse.de> * gimple-fold.c (gimple_fold_stmt_to_constant_1): Use the type of the LHS. (gimple_assign_nonnegative_warnv_p): Likewise. (gimple_call_nonnegative_warnv_p): Likewise. Return false if the call has no LHS. * gimple.c (gimple_could_trap_p_1): Use the type of the LHS. * tree-eh.c (stmt_could_throw_1_p): Likewise. * tree-inline.c (insert_init_stmt): Likewise. * tree-ssa-loop-niter.c (get_val_for): Likewise. * tree-outof-ssa.c (ssa_is_replaceable_p): Use the type of the def. * tree-ssa-sccvn.c (init_vn_nary_op_from_stmt): Take a gassign *. Use the type of the lhs. (vn_nary_op_lookup_stmt): Adjust. (vn_nary_op_insert_stmt): Likewise.
Diffstat (limited to 'gcc/tree-ssa-loop-niter.c')
-rw-r--r--gcc/tree-ssa-loop-niter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c
index b5add82..6fabf10 100644
--- a/gcc/tree-ssa-loop-niter.c
+++ b/gcc/tree-ssa-loop-niter.c
@@ -3018,7 +3018,7 @@ get_val_for (tree x, tree base)
else if (gimple_assign_rhs_class (stmt) == GIMPLE_UNARY_RHS
&& TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME)
return fold_build1 (gimple_assign_rhs_code (stmt),
- gimple_expr_type (stmt),
+ TREE_TYPE (gimple_assign_lhs (stmt)),
get_val_for (gimple_assign_rhs1 (stmt), base));
else if (gimple_assign_rhs_class (stmt) == GIMPLE_BINARY_RHS)
{
@@ -3031,7 +3031,7 @@ get_val_for (tree x, tree base)
else
gcc_unreachable ();
return fold_build2 (gimple_assign_rhs_code (stmt),
- gimple_expr_type (stmt), rhs1, rhs2);
+ TREE_TYPE (gimple_assign_lhs (stmt)), rhs1, rhs2);
}
else
gcc_unreachable ();