aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-math-opts.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-math-opts.c')
-rw-r--r--gcc/tree-ssa-math-opts.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c
index 073c9dc..df0bcd6 100644
--- a/gcc/tree-ssa-math-opts.c
+++ b/gcc/tree-ssa-math-opts.c
@@ -690,6 +690,8 @@ pass_cse_reciprocals::execute (function *fun)
gimple_set_vdef (stmt2, gimple_vdef (call));
SSA_NAME_DEF_STMT (gimple_vdef (stmt2)) = stmt2;
}
+ gimple_call_set_nothrow (stmt2,
+ gimple_call_nothrow_p (call));
gimple_set_vuse (stmt2, gimple_vuse (call));
gimple_stmt_iterator gsi2 = gsi_for_stmt (call);
gsi_replace (&gsi2, stmt2, true);
@@ -4100,6 +4102,8 @@ convert_to_divmod (gassign *stmt)
tree res = make_temp_ssa_name (build_complex_type (TREE_TYPE (op1)),
call_stmt, "divmod_tmp");
gimple_call_set_lhs (call_stmt, res);
+ /* We rejected throwing statements above. */
+ gimple_call_set_nothrow (call_stmt, true);
/* Insert the call before top_stmt. */
gimple_stmt_iterator top_stmt_gsi = gsi_for_stmt (top_stmt);