1 ; RUN: opt %loadNPMPolly -polly-only-func=f.*,g.* '-passes=print<polly-function-scops>' -disable-output < %s 2>&1 | FileCheck %s
3 ; Check that the flag `-polly-only-func` works with regexes.
6 ; CHECK-NEXT: Region: %for.cond---%for.end
9 ; CHECK-NEXT: Region: %for.cond---%for.end
12 ; CHECK-NEXT: Region: %for.cond---%for.end
14 ; CHECK-NOT: Function: h
17 ; for (int i = 0; i <= 100; i++)
21 ; for (int i = 0; i <= 100; i++)
25 ; for (int i = 0; i <= 100; i++)
29 ; for (int i = 0; i <= 100; i++)
32 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"
34 define void @f1(ptr %sum) {
36 br label %entry.split1
38 entry.split1: ; preds = %entry
41 entry.split: ; preds = %entry.split1
44 for.cond: ; preds = %for.cond, %entry.split
45 %i1.0 = phi i32 [ 0, %entry.split ], [ %inc, %for.cond ]
46 %sum.reload = load i32, ptr %sum
47 %mul = mul nsw i32 %i1.0, 3
48 %add = add nsw i32 %sum.reload, %mul
49 %inc = add nsw i32 %i1.0, 1
50 store i32 %add, ptr %sum
51 %cmp = icmp slt i32 %i1.0, 100
52 br i1 %cmp, label %for.cond, label %for.end
54 for.end: ; preds = %for.cond
59 define void @f2(ptr %sum) {
61 br label %entry.split1
63 entry.split1: ; preds = %entry
66 entry.split: ; preds = %entry.split1
69 for.cond: ; preds = %for.cond, %entry.split
70 %i1.0 = phi i32 [ 0, %entry.split ], [ %inc, %for.cond ]
71 %sum.reload = load i32, ptr %sum
72 %mul = mul nsw i32 %i1.0, 3
73 %add = add nsw i32 %sum.reload, %mul
74 %inc = add nsw i32 %i1.0, 1
75 store i32 %add, ptr %sum
76 %cmp = icmp slt i32 %i1.0, 100
77 br i1 %cmp, label %for.cond, label %for.end
79 for.end: ; preds = %for.cond
83 define void @g1(ptr %sum) {
85 br label %entry.split1
87 entry.split1: ; preds = %entry
90 entry.split: ; preds = %entry.split1
93 for.cond: ; preds = %for.cond, %entry.split
94 %i1.0 = phi i32 [ 0, %entry.split ], [ %inc, %for.cond ]
95 %sum.reload = load i32, ptr %sum
96 %mul = mul nsw i32 %i1.0, 3
97 %add = add nsw i32 %sum.reload, %mul
98 %inc = add nsw i32 %i1.0, 1
99 store i32 %add, ptr %sum
100 %cmp = icmp slt i32 %i1.0, 100
101 br i1 %cmp, label %for.cond, label %for.end
103 for.end: ; preds = %for.cond
107 define void @h(ptr %sum) {
109 br label %entry.split1
111 entry.split1: ; preds = %entry
112 br label %entry.split
114 entry.split: ; preds = %entry.split1
117 for.cond: ; preds = %for.cond, %entry.split
118 %i1.0 = phi i32 [ 0, %entry.split ], [ %inc, %for.cond ]
119 %sum.reload = load i32, ptr %sum
120 %mul = mul nsw i32 %i1.0, 3
121 %add = add nsw i32 %sum.reload, %mul
122 %inc = add nsw i32 %i1.0, 1
123 store i32 %add, ptr %sum
124 %cmp = icmp slt i32 %i1.0, 100
125 br i1 %cmp, label %for.cond, label %for.end
127 for.end: ; preds = %for.cond