summaryrefslogtreecommitdiffstats
path: root/polly/test/CodeGen/OpenMP/simple_nested_loop.c
diff options
context:
space:
mode:
authorTobias Grosser <grosser@fim.uni-passau.de>2011-04-29 06:27:02 +0000
committerTobias Grosser <grosser@fim.uni-passau.de>2011-04-29 06:27:02 +0000
commit758053788bde4747953f5f276ded345cd01323b1 (patch)
tree02f38df95a5327cb8644906d148b5bd8facf63f9 /polly/test/CodeGen/OpenMP/simple_nested_loop.c
parent011eae75123217b9125270ae08132a308cee7061 (diff)
downloadbcm5719-llvm-758053788bde4747953f5f276ded345cd01323b1.tar.gz
bcm5719-llvm-758053788bde4747953f5f276ded345cd01323b1.zip
Add initial version of Polly
This version is equivalent to commit ba26ebece8f5be84e9bd6315611d412af797147e in the old git repository. llvm-svn: 130476
Diffstat (limited to 'polly/test/CodeGen/OpenMP/simple_nested_loop.c')
-rw-r--r--polly/test/CodeGen/OpenMP/simple_nested_loop.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/polly/test/CodeGen/OpenMP/simple_nested_loop.c b/polly/test/CodeGen/OpenMP/simple_nested_loop.c
new file mode 100644
index 00000000000..6867d0b45c7
--- /dev/null
+++ b/polly/test/CodeGen/OpenMP/simple_nested_loop.c
@@ -0,0 +1,22 @@
+#include <string.h>
+#define N 10
+
+double A[N];
+double B[N];
+
+void loop_openmp() {
+ for (int i = 0; i < N; i++) {
+ for (int j = 0; j < N; j++) {
+ A[j] += j;
+ }
+ }
+}
+
+int main () {
+ memset(A, 0, sizeof(float) * N);
+
+ loop_openmp();
+
+ return 0;
+}
+
OpenPOWER on IntegriCloud