1 ;RUN: opt %loadPolly -polly-print-import-jscop -polly-import-jscop-postfix=transformed -disable-output < %s | FileCheck %s
2 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32"
4 @A = common global [100 x i32] zeroinitializer, align 4
5 @B = common global [100 x i32] zeroinitializer, align 4
7 define i32 @simple() nounwind {
11 for.cond: ; preds = %for.inc, %entry
12 %0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
13 %arrayidx = getelementptr [100 x i32], ptr @A, i32 0, i32 %0
14 %exitcond1 = icmp ne i32 %0, 12
15 br i1 %exitcond1, label %for.body, label %for.end
17 for.body: ; preds = %for.cond
18 store i32 %0, ptr %arrayidx
21 for.inc: ; preds = %for.body
22 %inc = add nsw i32 %0, 1
25 for.end: ; preds = %for.cond
29 for.cond4: ; preds = %for.inc11, %for.end
30 %1 = phi i32 [ 0, %for.end ], [ %inc13, %for.inc11 ]
31 %arrayidx10 = getelementptr [100 x i32], ptr @B, i32 0, i32 %1
32 %exitcond = icmp ne i32 %1, 12
33 br i1 %exitcond, label %for.body7, label %for.end14
35 for.body7: ; preds = %for.cond4
36 store i32 %1, ptr %arrayidx10
39 for.inc11: ; preds = %for.body7
40 %inc13 = add nsw i32 %1, 1
43 for.end14: ; preds = %for.cond4
46 ; CHECK-DAG: New access function '{ Stmt_for_body7[i0] -> MemRef_B[0] }' detected in JSCOP file
47 ; CHECK-DAG: New access function '{ Stmt_for_body[i0] -> MemRef_A[0] }' detected in JSCOP file