From ce777eaedfdc55850b429f97b2093f2de5da09de Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 16 Jul 2021 12:02:25 +0200 Subject: Get rid of some gimple_expr_type uses This gets rid of a few gimple_expr_type uses. 2021-07-16 Richard Biener * 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. --- gcc/tree-outof-ssa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/tree-outof-ssa.c') diff --git a/gcc/tree-outof-ssa.c b/gcc/tree-outof-ssa.c index b730196..1a133a0 100644 --- a/gcc/tree-outof-ssa.c +++ b/gcc/tree-outof-ssa.c @@ -87,7 +87,7 @@ ssa_is_replaceable_p (gimple *stmt) /* Float expressions must go through memory if float-store is on. */ if (flag_float_store - && FLOAT_TYPE_P (gimple_expr_type (stmt))) + && FLOAT_TYPE_P (TREE_TYPE (def))) return false; /* An assignment with a register variable on the RHS is not -- cgit v1.1