diff options
author | Tamar Christina <tamar.christina@arm.com> | 2017-08-23 11:32:47 +0000 |
---|---|---|
committer | Tamar Christina <tnfchris@gcc.gnu.org> | 2017-08-23 11:32:47 +0000 |
commit | 9880acc19effbc5fa5b1f5cb155a3a6a83f7c978 (patch) | |
tree | 4bb565e98c8d62a56a5a0ca26a443fdf6d3d8bf7 | |
parent | b00775e37336989474ec65551880b7804480eb9c (diff) | |
download | gcc-9880acc19effbc5fa5b1f5cb155a3a6a83f7c978.zip gcc-9880acc19effbc5fa5b1f5cb155a3a6a83f7c978.tar.gz gcc-9880acc19effbc5fa5b1f5cb155a3a6a83f7c978.tar.bz2 |
re PR middle-end/19706 (Recognize common Fortran usages of copysign.)
2017-08-23 Tamar Christina <tamar.christina@arm.com>
PR middle-end/19706
* tree-ssa-math-opts.c (convert_expand_mult_copysign):
Fix single-use check.
From-SVN: r251303
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-ssa-math-opts.c | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d5ada51..1c7462f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-08-23 Tamar Christina <tamar.christina@arm.com> + + PR middle-end/19706 + * tree-ssa-math-opts.c (convert_expand_mult_copysign): + Fix single-use check. + 2017-08-23 Thomas Preud'homme <thomas.preudhomme@arm.com> * gcc.c (execute): Only test for SIGKILL and SIGQUIT if available. diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c index 0d75751..073c9dc 100644 --- a/gcc/tree-ssa-math-opts.c +++ b/gcc/tree-ssa-math-opts.c @@ -3200,21 +3200,20 @@ convert_expand_mult_copysign (gimple *stmt, gimple_stmt_iterator *gsi) type = TREE_TYPE (lhs); machine_mode mode = TYPE_MODE (type); - if (HONOR_SNANS (type) || !has_single_use (lhs)) + if (HONOR_SNANS (type)) return false; if (TREE_CODE (treeop0) == SSA_NAME && TREE_CODE (treeop1) == SSA_NAME) { gimple *call0 = SSA_NAME_DEF_STMT (treeop0); - if (!is_copysign_call_with_1 (call0)) + if (!has_single_use (treeop0) || !is_copysign_call_with_1 (call0)) { call0 = SSA_NAME_DEF_STMT (treeop1); - if (!is_copysign_call_with_1 (call0)) + if (!has_single_use (treeop1) || !is_copysign_call_with_1 (call0)) return false; treeop1 = treeop0; } - if (optab_handler (xorsign_optab, mode) == CODE_FOR_nothing) return false; |