1 ; RUN: not --crash opt %loadPolly -polly-import-jscop -polly-ast -polly-ast-detect-parallel -disable-output < %s 2>&1 >/dev/null | FileCheck %s
3 ; CHECK: JScop file has no key name 'statements'.
5 ; Verify that the JSONImporter checks if there is a key name 'statements'.
7 ; void ia(int *A, long n) {
8 ; for (long i = 0; i < 2 * n; i++)
10 ; for (long i = 0; i < 2 * n; i++)
14 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"
16 define void @ia(ptr %A, i32 %n) {
20 for.cond: ; preds = %for.inc, %entry
21 %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
22 %mul = shl nsw i32 %n, 1
23 %cmp = icmp slt i32 %i.0, %mul
24 br i1 %cmp, label %for.body, label %for.end
26 for.body: ; preds = %for.cond
29 S0: ; preds = %for.body
30 %tmp = load i32, ptr %A, align 4
31 %add = add nsw i32 %tmp, %i.0
32 store i32 %add, ptr %A, align 4
35 for.inc: ; preds = %S0
36 %inc = add nsw i32 %i.0, 1
39 for.end: ; preds = %for.cond
42 for.cond2: ; preds = %for.inc8, %for.end
43 %i1.0 = phi i32 [ 0, %for.end ], [ %inc9, %for.inc8 ]
44 %mul3 = shl nsw i32 %n, 1
45 %cmp4 = icmp slt i32 %i1.0, %mul3
46 br i1 %cmp4, label %for.body5, label %for.end10
48 for.body5: ; preds = %for.cond2
51 S1: ; preds = %for.body5
52 %add6 = add nsw i32 %i1.0, 1
53 %arrayidx7 = getelementptr inbounds i32, ptr %A, i32 %add6
54 store i32 1, ptr %arrayidx7, align 4
57 for.inc8: ; preds = %S1
58 %inc9 = add nsw i32 %i1.0, 1
61 for.end10: ; preds = %for.cond2