Set the call nothrow flag more often
commit989f02dcdd9766cce6be6dea335478025daba853
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Aug 2017 07:47:05 +0000 (29 07:47 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Aug 2017 07:47:05 +0000 (29 07:47 +0000)
tree29ae014a56a196ff0764a9dd8c569efb193cb413
parent98102386fdf336139f9eafd40dace4e72fa27115
Set the call nothrow flag more often

This patch sets the nothrow flag for various calls to internal functions
that are not inherently NOTHROW (and so can't be declared that way in
internal-fn.def) but that are used in contexts that can guarantee
NOTHROWness.

2017-08-29  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* gimplify.c (gimplify_call_expr): Copy the nothrow flag to
calls to internal functions.
(gimplify_modify_expr): Likewise.
* tree-call-cdce.c (use_internal_fn): Likewise.
* tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
(convert_to_divmod): Set the nothrow flag.
* tree-if-conv.c (predicate_mem_writes):  Likewise.
* tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
(vectorizable_call): Likewise.
(vectorizable_store): Likewise.
(vectorizable_load): Likewise.
* tree-vect-patterns.c (vect_recog_pow_pattern): Likewise.
(vect_recog_mask_conversion_pattern): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251401 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/gimplify.c
gcc/tree-call-cdce.c
gcc/tree-if-conv.c
gcc/tree-ssa-math-opts.c
gcc/tree-vect-patterns.c
gcc/tree-vect-stmts.c