From 77c9d5b4e6e5d9b2da11249168211a45d2e716c8 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Fri, 20 May 2016 14:41:45 +0200 Subject: [PATCH] prefetch-5.c: xfail. * 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. From-SVN: r236508 --- gcc/ChangeLog | 5 +++++ gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/tree-ssa/prefetch-5.c | 6 ++++-- gcc/tree-ssa-loop-niter.c | 9 ++++----- 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 + + * tree-ssa-loop-niter.c (idx_infer_loop_bounds): We can not produce + realistic upper bounds here. + 2016-05-20 Jakub Jelinek 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 + + * gcc.dg/tree-ssa/prefetch-5.c: xfail. + 2016-05-20 Jakub Jelinek 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; } -- 2.30.2