aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-ccp.c
diff options
context:
space:
mode:
authorKazu Hirata <kazu@codesourcery.com>2005-12-21 16:48:59 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2005-12-21 16:48:59 +0000
commit0dd4b47b7fc8c9f9296429d348ec64df5afeb35a (patch)
tree0990c6705e08d5b4c38ec5a270b8925019dc291c /gcc/tree-ssa-ccp.c
parentad44e786b879ce503b59b9e3afd5abb821133f88 (diff)
downloadgcc-0dd4b47b7fc8c9f9296429d348ec64df5afeb35a.zip
gcc-0dd4b47b7fc8c9f9296429d348ec64df5afeb35a.tar.gz
gcc-0dd4b47b7fc8c9f9296429d348ec64df5afeb35a.tar.bz2
tree-data-ref.c (estimate_niter_from_size_of_data): Replace fold_build2 with fold_binary.
* tree-data-ref.c (estimate_niter_from_size_of_data): Replace fold_build2 with fold_binary. * tree-ssa-ccp.c (visit_assignment, maybe_fold_stmt_addition): Replace fold_build1 with fold_unary. * tree-ssa-reassoc.c (optimize_ops_list): Replace fold_build2 with fold_binary. From-SVN: r108913
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r--gcc/tree-ssa-ccp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index c428ef0..6731045 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -1191,9 +1191,9 @@ visit_assignment (tree stmt, tree *output_p)
if (TREE_CODE (orig_lhs) == VIEW_CONVERT_EXPR
&& val.lattice_val == CONSTANT)
{
- tree w = fold_build1 (VIEW_CONVERT_EXPR,
- TREE_TYPE (TREE_OPERAND (orig_lhs, 0)),
- val.value);
+ tree w = fold_unary (VIEW_CONVERT_EXPR,
+ TREE_TYPE (TREE_OPERAND (orig_lhs, 0)),
+ val.value);
orig_lhs = TREE_OPERAND (orig_lhs, 0);
if (w && is_gimple_min_invariant (w))
@@ -1901,9 +1901,9 @@ maybe_fold_stmt_addition (tree expr)
{
if (TYPE_UNSIGNED (TREE_TYPE (op1)))
return NULL;
- op1 = fold_build1 (NEGATE_EXPR, TREE_TYPE (op1), op1);
+ op1 = fold_unary (NEGATE_EXPR, TREE_TYPE (op1), op1);
/* ??? In theory fold should always produce another integer. */
- if (TREE_CODE (op1) != INTEGER_CST)
+ if (op1 == NULL || TREE_CODE (op1) != INTEGER_CST)
return NULL;
}