65 lines · plain
1; RUN: not --crash opt %loadNPMPolly '-passes=polly-custom<import-jscop;ast>' -polly-print-ast -polly-ast-detect-parallel -disable-output < %s 2>&1 >/dev/null | FileCheck %s2;3; CHECK: The number of indices and the number of statements differ.4;5; Verify if the JSONImporter check if there is the right number of statements.6;7; void is2(int *A, long n) {8; for (long i = 0; i < 2 * n; i++)9; S0: A[0] += i;10; for (long i = 0; i < 2 * n; i++)11; S1: A[i + 1] = 1;12; }13;14target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"15 16define void @is2(ptr %A, i32 %n) {17entry:18 br label %for.cond19 20for.cond: ; preds = %for.inc, %entry21 %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ]22 %mul = shl nsw i32 %n, 123 %cmp = icmp slt i32 %i.0, %mul24 br i1 %cmp, label %for.body, label %for.end25 26for.body: ; preds = %for.cond27 br label %S028 29S0: ; preds = %for.body30 %tmp = load i32, ptr %A, align 431 %add = add nsw i32 %tmp, %i.032 store i32 %add, ptr %A, align 433 br label %for.inc34 35for.inc: ; preds = %S036 %inc = add nsw i32 %i.0, 137 br label %for.cond38 39for.end: ; preds = %for.cond40 br label %for.cond241 42for.cond2: ; preds = %for.inc8, %for.end43 %i1.0 = phi i32 [ 0, %for.end ], [ %inc9, %for.inc8 ]44 %mul3 = shl nsw i32 %n, 145 %cmp4 = icmp slt i32 %i1.0, %mul346 br i1 %cmp4, label %for.body5, label %for.end1047 48for.body5: ; preds = %for.cond249 br label %S150 51S1: ; preds = %for.body552 %add6 = add nsw i32 %i1.0, 153 %arrayidx7 = getelementptr inbounds i32, ptr %A, i32 %add654 store i32 1, ptr %arrayidx7, align 455 br label %for.inc856 57for.inc8: ; preds = %S158 %inc9 = add nsw i32 %i1.0, 159 br label %for.cond260 61for.end10: ; preds = %for.cond262 ret void63}64 65