diff options
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r-- | gcc/tree-ssa-ccp.c | 10 |
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; } |