summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivopts.c
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-28 18:42:15 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-28 18:42:15 +0000
commit134c053efb725c8dfa8238c3329ea0439f96df09 (patch)
treefd9dab29f46e485b9afc38a2e968d2b4f9bb77eb /gcc/tree-ssa-loop-ivopts.c
parent9fc1b63766a4be0cffd236a2c7ce7e4e2af5d8a7 (diff)
downloadgcc-134c053efb725c8dfa8238c3329ea0439f96df09.tar.gz
When niter may be zero, return a COND_EXPR with the may_be_zero condition.
2010-05-28 Sebastian Pop <sebastian.pop@amd.com> * tree-scalar-evolution.c (set_nb_iterations_in_loop): Inlined in the only place it was called from. (number_of_latch_executions): Do not return chrec_dont_know when the may_be_zero is a runtime condition: instead, return a COND_EXPR including the may_be_zero condition. * cfgloop.h (struct loop): Add a note on COND_EXPRs to the comment of nb_iterations. * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Handle COND_EXPRs. * gcc.dg/vect/vect-outer-fir-lb.c: Un-XFAIL-ed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159992 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.c')
-rw-r--r--gcc/tree-ssa-loop-ivopts.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 9592832f9b7..bda640f3e0e 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -681,6 +681,11 @@ contains_abnormal_ssa_name_p (tree expr)
idx_contains_abnormal_ssa_name_p,
NULL);
+ if (code == COND_EXPR)
+ return contains_abnormal_ssa_name_p (TREE_OPERAND (expr, 0))
+ || contains_abnormal_ssa_name_p (TREE_OPERAND (expr, 1))
+ || contains_abnormal_ssa_name_p (TREE_OPERAND (expr, 2));
+
switch (codeclass)
{
case tcc_binary: