aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2016-05-20 12:41:45 +0000
committerJan Hubicka <hubicka@ucw.cz>2016-05-20 12:41:45 +0000
commitd227595682396630ff3c2a89a06176bbcc9718f0 (patch)
tree622f8a14e9ac79e665e7c044d11173797cafb6ca
parent820e3583ed849c18500c63ef514e719143751b1f (diff)
* gcc.dg/tree-ssa/prefetch-5.c: xfail.
* tree-ssa-loop-niter.c (idx_infer_loop_bounds): We can not produce realistic upper bounds here. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@236508 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/prefetch-5.c6
-rw-r--r--gcc/tree-ssa-loop-niter.c9
4 files changed, 17 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 403c01fa997..1d5bca7131b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2016-05-20 Jan Hubicka <hubicka@ucw.cz>
+
+ * tree-ssa-loop-niter.c (idx_infer_loop_bounds): We can not produce
+ realistic upper bounds here.
+
2016-05-20 Jakub Jelinek <jakub@redhat.com>
PR c++/71210
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index fe4727a5e3c..9ddd4f9e682 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2016-05-20 Jan Hubicka <hubicka@ucw.cz>
+
+ * gcc.dg/tree-ssa/prefetch-5.c: xfail.
+
2016-05-20 Jakub Jelinek <jakub@redhat.com>
PR c++/71210
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/prefetch-5.c b/gcc/testsuite/gcc.dg/tree-ssa/prefetch-5.c
index f2b1d08d0ec..fc2c267b178 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/prefetch-5.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/prefetch-5.c
@@ -54,5 +54,7 @@ int loop5 (int n, struct tail5 *x)
return s;
}
-/* { dg-final { scan-tree-dump-times "Issued prefetch" 2 "aprefetch" } } */
-/* { dg-final { scan-tree-dump-times "Not prefetching" 1 "aprefetch" } } */
+/* Until we are able to track likely upper bounds, we can't really work out that
+ small trailing arrays should not be prefetched. */
+/* { dg-final { scan-tree-dump-times "Issued prefetch" 2 "aprefetch" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump-times "Not prefetching" 1 "aprefetch" { xfail *-*-* } } } */
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c
index c61083e7fd3..5afc9b3fdf0 100644
--- a/gcc/tree-ssa-loop-niter.c
+++ b/gcc/tree-ssa-loop-niter.c
@@ -3115,7 +3115,6 @@ idx_infer_loop_bounds (tree base, tree *idx, void *dta)
tree low, high, type, next;
bool sign, upper = true, at_end = false;
struct loop *loop = data->loop;
- bool reliable = true;
if (TREE_CODE (base) != ARRAY_REF)
return true;
@@ -3187,14 +3186,14 @@ idx_infer_loop_bounds (tree base, tree *idx, void *dta)
&& tree_int_cst_compare (next, high) <= 0)
return true;
- /* If access is not executed on every iteration, we must ensure that overlow may
- not make the access valid later. */
+ /* If access is not executed on every iteration, we must ensure that overlow
+ may not make the access valid later. */
if (!dominated_by_p (CDI_DOMINATORS, loop->latch, gimple_bb (data->stmt))
&& scev_probably_wraps_p (initial_condition_in_loop_num (ev, loop->num),
step, data->stmt, loop, true))
- reliable = false;
+ upper = false;
- record_nonwrapping_iv (loop, init, step, data->stmt, low, high, reliable, upper);
+ record_nonwrapping_iv (loop, init, step, data->stmt, low, high, false, upper);
return true;
}