2 ; RUN: opt %loadNPMPolly -O3 -polly -polly-position=before-vectorizer -polly-dump-before --disable-output %s
3 ; RUN: FileCheck --input-file=dumpfunction-callee-before.ll --check-prefix=CHECK --check-prefix=CALLEE %s
4 ; RUN: FileCheck --input-file=dumpfunction-caller-before.ll --check-prefix=CHECK --check-prefix=CALLER %s
6 ; RUN: opt %loadNPMPolly -O3 -polly -polly-position=before-vectorizer -polly-dump-after --disable-output %s
7 ; RUN: FileCheck --input-file=dumpfunction-callee-after.ll --check-prefix=CHECK --check-prefix=CALLEE %s
8 ; RUN: FileCheck --input-file=dumpfunction-caller-after.ll --check-prefix=CHECK --check-prefix=CALLER %s
10 ; void callee(int n, double A[], int i) {
11 ; for (int j = 0; j < n; j += 1)
15 ; void caller(int n, double A[]) {
16 ; for (int i = 0; i < n; i += 1)
21 %unrelated_type = type { i32 }
23 define internal void @callee(i32 %n, ptr noalias nonnull %A, i32 %i) #0 {
28 %j = phi i32 [0, %entry], [%j.inc, %inc]
29 %j.cmp = icmp slt i32 %j, %n
30 br i1 %j.cmp, label %body, label %exit
34 %arrayidx = getelementptr inbounds double, ptr %A, i32 %idx
35 store double 42.0, ptr %arrayidx
39 %j.inc = add nuw nsw i32 %j, 1
50 define void @caller(i32 %n, ptr noalias nonnull %A) #0 {
55 %i = phi i32 [0, %entry], [%j.inc, %inc]
56 %i.cmp = icmp slt i32 %i, %n
57 br i1 %i.cmp, label %body, label %exit
60 call void @callee(i32 %n, ptr %A, i32 %i)
64 %j.inc = add nuw nsw i32 %i, 1
75 declare void @unrelated_decl()
78 attributes #0 = { noinline }
84 ; CHECK-NOT: unrelated_type
86 ; CALLEE-LABEL: @callee(
88 ; CALLEE-NOT: @unrelated_decl
90 ; CALLER-NOT: define {{.*}} @callee(
91 ; CALLER-LABEL: @caller(
93 ; CHECK-NOT: @unrelated_decl