aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-propagate.c
diff options
context:
space:
mode:
authorRafael Avila de Espindola <espindola@google.com>2008-04-24 09:48:41 +0000
committerRafael Espindola <espindola@gcc.gnu.org>2008-04-24 09:48:41 +0000
commite80d7580e746c0d984bf35968b97b7b88f328e00 (patch)
tree831bbe410099a9e9cd9808e14ec5ced2f9d783b4 /gcc/tree-ssa-propagate.c
parent0e37a1c243896f03ad5fbfd4d3306802e20bc564 (diff)
downloadgcc-e80d7580e746c0d984bf35968b97b7b88f328e00.zip
gcc-e80d7580e746c0d984bf35968b97b7b88f328e00.tar.gz
gcc-e80d7580e746c0d984bf35968b97b7b88f328e00.tar.bz2
tree-flow.h (vrp_evaluate_conditional): Change signature.
2008-04-24 Rafael Espindola <espindola@google.com> * tree-flow.h (vrp_evaluate_conditional): Change signature. * tree-ssa-propagate.c (fold_predicate_in): Update call to vrp_evaluate_conditional. * tree-vrp.c (vrp_evaluate_conditional_warnv): Remove. (vrp_evaluate_conditional): Split the cond argument. (vrp_visit_cond_stmt): Use vrp_evaluate_conditional_warnv_with_ops. (simplify_stmt_for_jump_threading): Update call to vrp_evaluate_conditional. From-SVN: r134625
Diffstat (limited to 'gcc/tree-ssa-propagate.c')
-rw-r--r--gcc/tree-ssa-propagate.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c
index c37cfa5..6423ec6 100644
--- a/gcc/tree-ssa-propagate.c
+++ b/gcc/tree-ssa-propagate.c
@@ -1148,7 +1148,17 @@ fold_predicate_in (tree stmt)
else
return false;
- val = vrp_evaluate_conditional (*pred_p, stmt);
+ if (TREE_CODE (*pred_p) == SSA_NAME)
+ val = vrp_evaluate_conditional (EQ_EXPR,
+ *pred_p,
+ boolean_true_node,
+ stmt);
+ else
+ val = vrp_evaluate_conditional (TREE_CODE (*pred_p),
+ TREE_OPERAND (*pred_p, 0),
+ TREE_OPERAND (*pred_p, 1),
+ stmt);
+
if (val)
{
if (modify_stmt_p)