aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-41.c
diff options
context:
space:
mode:
authorno-author <no-author@gcc.gnu.org>2005-03-09 23:20:13 +0000
committerno-author <no-author@gcc.gnu.org>2005-03-09 23:20:13 +0000
commit1caddad370c8448d924d64b0e03a4ff0d27e8ed5 (patch)
tree3dd34a8c34793776e40587f22f12789ab230d69d /gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-41.c
parent9e88bc8754ac91301313180a1f11bbf74ed1a9dc (diff)
This commit was manufactured by cvs2svn to create tagapple/gcc-5000
'apple-gcc-5000'. git-svn-id: https://gcc.gnu.org/svn/gcc/tags/apple-gcc-5000@96220 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-41.c')
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-41.c53
1 files changed, 53 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-41.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-41.c
new file mode 100644
index 00000000000..ab93fbcaf98
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-41.c
@@ -0,0 +1,53 @@
+/* APPLE LOCAL file lno */
+/* { dg-do compile } */
+/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */
+
+
+int main ()
+{
+ int a = 2;
+ int b = 4;
+ int c = 2;
+
+ while (a)
+ {
+ a *= 3;
+ for (c = -10; c < 0; c++)
+ {
+ /* Exercises the build_exponential_evolution_in_loop function in the following context:
+ (multiply_evolution
+ loop_num = 2
+ chrec_before = {2, *, 3}_1
+ to_mult = {4, *, 5}_1
+ res = {{2, *, 3}_1, *, {4, *, 5}_1}_2
+ )
+
+ Then it exerces the chrec_apply in the following context:
+ (chrec_apply
+ var = 2
+ chrec = {0, +, {4, *, 5}_1}_2
+ x = 10
+ res = {40, *, 5}_1
+ )
+
+ Finally it tests the
+ (add_to_evolution
+ loop_num = 1
+ chrec_before = {{2, *, 3}_1, *, {4, *, 5}_1}_2
+ to_add = {40, *, 5}_1
+ res = {{2, *, {120, *, 5}_1}_1, *, {4, *, 5}_1}_2
+ )
+ */
+ a *= b;
+ }
+ b *= 5;
+ }
+}
+
+/*
+ c -> {-10, +, 1}_2
+ b -> {4, *, 5}_1
+ a -> {{2, *, {120, *, 5}_1}_1, *, {4, *, 5}_1}_2
+*/
+
+/* FIXME. */