aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMisha Brukman <brukman+llvm@gmail.com>2003-04-10 22:01:15 +0000
committerMisha Brukman <brukman+llvm@gmail.com>2003-04-10 22:01:15 +0000
commit5cd8ae925584b621de2f9746b58ecb17040c30ea (patch)
tree5c6ea7a6b996a182bd3048edf43f1b7b2b3cd43c
parentcf54d17f752a9ee969fea0f527ffacb354b265cb (diff)
Simple arithmetic loop-based test case for modulo scheduling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5774 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Transforms/ModuloSched/arith-simple.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Transforms/ModuloSched/arith-simple.c b/test/Transforms/ModuloSched/arith-simple.c
new file mode 100644
index 0000000000..7f3b83ef27
--- /dev/null
+++ b/test/Transforms/ModuloSched/arith-simple.c
@@ -0,0 +1,18 @@
+#include <stdio.h>
+
+int main (int argc, char** argv) {
+ int a, b, c, d, i;
+
+ a = b = c = d = 1;
+
+ for (i=0; i < 15; i++) {
+ a = b + c;
+ c = d - b;
+ d = a + b;
+ b = c + i;
+ }
+
+ printf("a = %d, b = %d, c = %d, d = %d\n", a, b, c, d);
+
+ return 0;
+}