aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite
diff options
context:
space:
mode:
authorAditya Kumar <aditya.k7@samsung.com>2015-08-18 18:07:08 (GMT)
committerAditya Kumar <aditya.k7@samsung.com>2015-08-27 19:47:11 (GMT)
commit4eb84d2bc49c3e210e30683186b4f9272994f026 (patch)
tree8b0b94e25b8d17b25e274cef17a8c82810fb967b /gcc-4.9/gcc/testsuite
parent6cf9a82e4165911e0df28baf66d71b33253108a6 (diff)
downloadtoolchain_gcc-4eb84d2bc49c3e210e30683186b4f9272994f026.zip
toolchain_gcc-4eb84d2bc49c3e210e30683186b4f9272994f026.tar.gz
toolchain_gcc-4eb84d2bc49c3e210e30683186b4f9272994f026.tar.bz2
Cherry-pick: PR tree-optimization/65447
commit ad478851f7dd45438a9b33ecd7f30a4e6ab00388 Author: amker <amker@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Wed May 20 05:15:56 2015 +0000 PR tree-optimization/65447 * tree-ssa-loop-ivopts.c (struct iv_use): New fields. (dump_use, dump_uses): Support to dump sub use. (record_use): New parameters to support sub use. Remove call to dump_use. (record_sub_use, record_group_use): New functions. (compute_max_addr_offset, split_all_small_groups): New functions. (group_address_uses, rewrite_use_address): New functions. (strip_offset): New declaration. (find_interesting_uses_address): Call record_group_use. (add_candidate): New assertion. (infinite_cost_p): Move definition forward. (add_costs): Check INFTY cost and return immediately. (get_computation_cost_at): Clear setup cost and dependent bitmap for sub uses. (determine_use_iv_cost_address): Compute cost for sub uses. (rewrite_use_address_1): Rename from old rewrite_use_address. (free_loop_data): Free sub uses. (tree_ssa_iv_optimize_loop): Call group_address_uses. gcc/testsuite PR tree-optimization/65447 * gcc.dg/tree-ssa/pr65447.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223433 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc-4.9/gcc/testsuite')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr65447.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr65447.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr65447.c
new file mode 100644
index 0000000..c5bddbf
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr65447.c
@@ -0,0 +1,54 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-ivopts-details" } */
+
+void foo (double *p)
+{
+ int i;
+ for (i = -20000; i < 200000; i+= 40)
+ {
+ p[i+0] = 1.0;
+ p[i+1] = 1.0;
+ p[i+2] = 1.0;
+ p[i+3] = 1.0;
+ p[i+4] = 1.0;
+ p[i+5] = 1.0;
+ p[i+6] = 1.0;
+ p[i+7] = 1.0;
+ p[i+8] = 1.0;
+ p[i+9] = 1.0;
+ p[i+10] = 1.0;
+ p[i+11] = 1.0;
+ p[i+12] = 1.0;
+ p[i+13] = 1.0;
+ p[i+14] = 1.0;
+ p[i+15] = 1.0;
+ p[i+16] = 1.0;
+ p[i+17] = 1.0;
+ p[i+18] = 1.0;
+ p[i+19] = 1.0;
+ p[i+20] = 1.0;
+ p[i+21] = 1.0;
+ p[i+22] = 1.0;
+ p[i+23] = 1.0;
+ p[i+24] = 1.0;
+ p[i+25] = 1.0;
+ p[i+26] = 1.0;
+ p[i+27] = 1.0;
+ p[i+28] = 1.0;
+ p[i+29] = 1.0;
+ p[i+30] = 1.0;
+ p[i+31] = 1.0;
+ p[i+32] = 1.0;
+ p[i+33] = 1.0;
+ p[i+34] = 1.0;
+ p[i+35] = 1.0;
+ p[i+36] = 1.0;
+ p[i+37] = 1.0;
+ p[i+38] = 1.0;
+ p[i+39] = 1.0;
+ }
+}
+
+/* We should groups address type IV uses. */
+/* { dg-final { scan-tree-dump-not "\\nuse 2\\n" "ivopts" } } */
+/* { dg-final { cleanup-tree-dump "ivopts" } } */