aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivcanon.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2019-10-07 07:53:45 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2019-10-07 07:53:45 +0000
commit806bdf4e40d31cf55744c876eb9f17654de36b99 (patch)
tree6dc6ccd9075dc7a84dfda6fb6ba4c80c1786f6b9 /gcc/tree-ssa-loop-ivcanon.c
parent3e1f7c33aeaf33ca532fbef745bb4ab1e3b0aa3f (diff)
downloadgcc-806bdf4e40d31cf55744c876eb9f17654de36b99.zip
gcc-806bdf4e40d31cf55744c876eb9f17654de36b99.tar.gz
gcc-806bdf4e40d31cf55744c876eb9f17654de36b99.tar.bz2
re PR tree-optimization/91975 (worse code for small array copy using pointer arithmetic than array indexing)
2019-10-07 Richard Biener <rguenther@suse.de> PR tree-optimization/91975 * tree-ssa-loop-ivcanon.c (constant_after_peeling): Consistently handle invariants. * g++.dg/tree-ssa/ivopts-3.C: Adjust. * gcc.dg/vect/vect-profile-1.c: Disable cunrolli. * gcc.dg/vect/vect-double-reduc-6.c: Disable unrolling of the innermost loop. * gcc.dg/vect/vect-93.c: Likewise. * gcc.dg/vect/vect-105.c: Likewise. * gcc.dg/vect/pr79920.c: Likewise. * gcc.dg/vect/no-vfa-vect-102.c: Likewise. * gcc.dg/vect/no-vfa-vect-101.c: Likewise. * gcc.dg/vect/pr83202-1.c: Operate on a larger array. * gfortran.dg/vect/vect-8.f90: Likewise. * gcc.dg/tree-ssa/cunroll-2.c: Scan early unrolling dump instead of late one. From-SVN: r276645
Diffstat (limited to 'gcc/tree-ssa-loop-ivcanon.c')
-rw-r--r--gcc/tree-ssa-loop-ivcanon.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c
index 5952cad..d38959c 100644
--- a/gcc/tree-ssa-loop-ivcanon.c
+++ b/gcc/tree-ssa-loop-ivcanon.c
@@ -195,9 +195,8 @@ constant_after_peeling (tree op, gimple *stmt, class loop *loop)
/* Induction variables are constants when defined in loop. */
if (loop_containing_stmt (stmt) != loop)
return false;
- tree ev = analyze_scalar_evolution (loop, op);
- if (chrec_contains_undetermined (ev)
- || chrec_contains_symbols (ev))
+ tree ev = instantiate_parameters (loop, analyze_scalar_evolution (loop, op));
+ if (chrec_contains_undetermined (ev))
return false;
return true;
}