diff options
Diffstat (limited to 'polly/test/CodeGen/sequential_loops.ll')
| -rw-r--r-- | polly/test/CodeGen/sequential_loops.ll | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/polly/test/CodeGen/sequential_loops.ll b/polly/test/CodeGen/sequential_loops.ll index 56bad0a6562..9ce1a20039c 100644 --- a/polly/test/CodeGen/sequential_loops.ll +++ b/polly/test/CodeGen/sequential_loops.ll @@ -1,4 +1,36 @@ ; RUN: opt %loadPolly %defaultOpts -polly-cloog -analyze %s | FileCheck %s + +;#include <string.h> +;#define N 1024 +; +;int A[N]; +; +;void sequential_loops() { +; int i; +; for (i = 0; i < N/2; i++) { +; A[i] = 1; +; } +; for (i = N/2 ; i < N; i++) { +; A[i] = 2; +; } +;} +; +;int main () { +; int i; +; memset(A, 0, sizeof(int) * N); +; +; sequential_loops(); +; +; for (i = 0; i < N; i++) { +; if (A[i] != 1 && i < N/2) +; return 1; +; if (A[i] != 2 && i >= N/2) +; return 1; +; } +; +; return 0; +;} + ; ModuleID = 'sequential_loops.s' target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" target triple = "x86_64-pc-linux-gnu" |

