1 ; RUN: opt %loadNPMPolly -O3 -polly -polly-position=early -disable-output -debug-only=polly-scops < %s 2>&1 | FileCheck %s --check-prefix=NOINLINE
2 ; RUN: opt %loadNPMPolly -O3 -polly -polly-position=early -polly-run-inliner -disable-output -debug-only=polly-scops < %s 2>&1 | FileCheck %s --check-prefix=INLINED1
3 ; RUN: opt %loadNPMPolly -O3 -polly -polly-position=before-vectorizer -disable-output -debug-only=polly-scops < %s 2>&1 | FileCheck %s --check-prefix=INLINED3
7 ; void callee(int n, double A[], int i) {
8 ; for (int j = 0; j < n; j += 1)
12 ; void caller(int n, double A[]) {
13 ; for (int i = 0; i < n; i += 1)
18 define internal void @callee(i32 %n, ptr noalias nonnull %A, i32 %i) {
23 %j = phi i32 [0, %entry], [%j.inc, %inc]
24 %j.cmp = icmp slt i32 %j, %n
25 br i1 %j.cmp, label %body, label %exit
29 %arrayidx = getelementptr inbounds double, ptr %A, i32 %idx
30 store double 42.0, ptr %arrayidx
34 %j.inc = add nuw nsw i32 %j, 1
45 define void @caller(i32 %n, ptr noalias nonnull %A) {
50 %i = phi i32 [0, %entry], [%j.inc, %inc]
51 %i.cmp = icmp slt i32 %i, %n
52 br i1 %i.cmp, label %body, label %exit
55 call void @callee(i32 %n, ptr %A, i32 %i)
59 %j.inc = add nuw nsw i32 %i, 1
70 ; NOINLINE-LABEL: Function: callee
71 ; NOINLINE: Schedule :=
72 ; NOINLINE-NEXT: [n, i] -> { Stmt_body[i0] -> [i0] };
74 ; INLINED1-LABEL: Function: caller
75 ; INLINED1: Schedule :=
76 ; INLINED1-NEXT: [n] -> { Stmt_body_i[i0, i1] -> [i0, i1] };
78 ; INLINED2-LABEL: Function: caller
79 ; INLINED2: Schedule :=
80 ; INLINED2-NEXT: [n] -> { Stmt_polly_loop_header_i_us_us[i0, i1] -> [i0, 1, i1] };
82 ; INLINED3-LABEL: Function: caller
83 ; INLINED3: Schedule :=
84 ; INLINED3-NEXT: [n] -> { Stmt_body_i_us[i0, i1] -> [i0, i1] };