summaryrefslogtreecommitdiff
path: root/gcc/tree-chrec.h
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-21 23:05:39 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-21 23:05:39 +0000
commit8da11536673aba7617a056943f17b857808c32de (patch)
tree19f73c5acca1dc29d3476bc353efe3c387d3dae3 /gcc/tree-chrec.h
parent8d057f8c0150a739ccf6fd8a8ce21fba794efa1b (diff)
downloadgcc-8da11536673aba7617a056943f17b857808c32de.tar.gz
PR tree-optimization/41497
* tree-scalar-evolution.c (analyze_evolution_in_loop): Return chrec_dont_know if the evolution function returned by follow_ssa_edge is constant in the analyzed loop and is not compatible with the initial value before the loop. * tree-chrec.h (no_evolution_in_loop_p): Call STRIP_NOPS. * gcc.dg/tree-ssa/pr41497.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153441 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-chrec.h')
-rw-r--r--gcc/tree-chrec.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/tree-chrec.h b/gcc/tree-chrec.h
index f21aa74d795..545db38a730 100644
--- a/gcc/tree-chrec.h
+++ b/gcc/tree-chrec.h
@@ -115,6 +115,7 @@ no_evolution_in_loop_p (tree chrec, unsigned loop_num, bool *res)
|| chrec_contains_symbols_defined_in_loop (chrec, loop_num))
return false;
+ STRIP_NOPS (chrec);
scev = hide_evolution_in_other_loops_than_loop (chrec, loop_num);
*res = !tree_is_chrec (scev);
return true;