diff options
author | Richard Biener <rguenther@suse.de> | 2014-10-30 13:13:35 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2014-10-30 13:13:35 +0000 |
commit | 36a60e48f4eac678cdcf0c59c0f01b9f58c7d900 (patch) | |
tree | 503ff6868c680195720861d2ad6beb4789e69889 /gcc/tree-ssa-forwprop.c | |
parent | 6327f612fd6631094742bdb4e4999a48bd376382 (diff) | |
download | gcc-36a60e48f4eac678cdcf0c59c0f01b9f58c7d900.zip gcc-36a60e48f4eac678cdcf0c59c0f01b9f58c7d900.tar.gz gcc-36a60e48f4eac678cdcf0c59c0f01b9f58c7d900.tar.bz2 |
match.pd: Implement more patterns that simplify to a single value.
2014-10-30 Richard Biener <rguenther@suse.de>
* match.pd: Implement more patterns that simplify to a single value.
* fold-const.c (fold_binary_loc): Remove them here.
* tree-ssa-forwprop.c (simplify_bitwise_binary): Likewise.
(fwprop_ssa_val): Remove restriction on single uses.
From-SVN: r216933
Diffstat (limited to 'gcc/tree-ssa-forwprop.c')
-rw-r--r-- | gcc/tree-ssa-forwprop.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index a5283a2..d67a4b6 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -2097,16 +2097,6 @@ simplify_bitwise_binary (gimple_stmt_iterator *gsi) return true; } - /* Canonicalize X ^ ~0 to ~X. */ - if (code == BIT_XOR_EXPR - && integer_all_onesp (arg2)) - { - gimple_assign_set_rhs_with_ops (gsi, BIT_NOT_EXPR, arg1, NULL_TREE); - gcc_assert (gsi_stmt (*gsi) == stmt); - update_stmt (stmt); - return true; - } - /* Try simple folding for X op !X, and X op X. */ res = simplify_bitwise_binary_1 (code, TREE_TYPE (arg1), arg1, arg2); if (res != NULL_TREE) @@ -3554,11 +3544,9 @@ fwprop_ssa_val (tree name) if (val) name = val; } - /* If NAME is not the only use signal we don't want to continue - matching into its definition. */ - if (TREE_CODE (name) == SSA_NAME - && !has_single_use (name)) - return NULL_TREE; + /* We continue matching along SSA use-def edges for SSA names + that are not single-use. Currently there are no patterns + that would cause any issues with that. */ return name; } |