aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr41488.c
diff options
context:
space:
mode:
authorBin Cheng <bin.cheng@arm.com>2013-12-13 11:36:22 +0000
committerBin Cheng <amker@gcc.gnu.org>2013-12-13 11:36:22 +0000
commitb83b550780a6ee31c6e8b9da922c2a087f7bd44c (patch)
tree8a279853c02062aa9b7a75a2527c0964cd7b3e93 /gcc/testsuite/gcc.dg/pr41488.c
parenta005b5befd6bb3166b1d7c5269a2c791e4a4ee7c (diff)
downloadgcc-b83b550780a6ee31c6e8b9da922c2a087f7bd44c.zip
gcc-b83b550780a6ee31c6e8b9da922c2a087f7bd44c.tar.gz
gcc-b83b550780a6ee31c6e8b9da922c2a087f7bd44c.tar.bz2
re PR tree-optimization/58296 (ivopts is unable to handle some loops altered by the loop header copying pass)
PR tree-optimization/58296 PR tree-optimization/41488 * tree-scalar-evolution.c: Include necessary header files. (simplify_peeled_chrec): New function. (analyze_evolution_in_loop): New static variable. Call simplify_peeled_chrec. * tree-ssa-loop-ivopts.c (mark_bivs): Don't mark peeled IV as biv. (add_old_iv_candidates): Don't add candidate for peeled IV. * tree-affine.h (aff_combination_zero_p): New function. PR tree-optimization/58296 PR tree-optimization/41488 * gcc.dg/tree-ssa/scev-7.c: New test. * gcc.dg/pr41488.c: New test. * g++.dg/pr59445.C: New test. From-SVN: r205959
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr41488.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr41488.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr41488.c b/gcc/testsuite/gcc.dg/pr41488.c
new file mode 100644
index 0000000..c4bc428
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr41488.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-sccp-scev" } */
+
+struct struct_t
+{
+ int* data;
+};
+
+void foo (struct struct_t* sp, int start, int end)
+{
+ int i;
+
+ for (i = 0; i+start < end; i++)
+ sp->data[i+start] = 0;
+}
+
+/* { dg-final { scan-tree-dump-times "Simplify PEELED_CHREC into POLYNOMIAL_CHREC" 1 "sccp" } } */
+/* { dg-final { cleanup-tree-dump "sccp" } } */