236
|
1 ; RUN: opt %loadPolly -polly-ignore-func=f.*,g.* -polly-print-scops -disable-output < %s | FileCheck %s
|
150
|
2 ;
|
|
3 ; Check that the flag `-polly-ignore-func` works with regexes.
|
|
4 ;
|
|
5 ; CHECK: Function: h
|
|
6 ; CHECK-NEXT: Region: %for.cond---%for.end
|
|
7 ;
|
|
8 ; CHECK-NOT: Function:
|
|
9 ;
|
|
10 ; void f1(int* sum) {
|
|
11 ; for (int i = 0; i <= 100; i++)
|
|
12 ; sum += i * 3;
|
|
13 ; }
|
|
14 ; void f2(int* sum) {
|
|
15 ; for (int i = 0; i <= 100; i++)
|
|
16 ; sum += i * 3;
|
|
17 ; }
|
|
18 ; void g1(int* sum) {
|
|
19 ; for (int i = 0; i <= 100; i++)
|
|
20 ; sum += i * 3;
|
|
21 ; }
|
|
22 ; void h(int* sum) {
|
|
23 ; for (int i = 0; i <= 100; i++)
|
|
24 ; sum += i * 3;
|
|
25 ; }
|
|
26 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"
|
|
27
|
252
|
28 define void @f1(ptr %sum) {
|
150
|
29 entry:
|
|
30 br label %entry.split1
|
|
31
|
|
32 entry.split1: ; preds = %entry
|
|
33 br label %entry.split
|
|
34
|
|
35 entry.split: ; preds = %entry.split1
|
|
36 br label %for.cond
|
|
37
|
|
38 for.cond: ; preds = %for.cond, %entry.split
|
|
39 %i1.0 = phi i32 [ 0, %entry.split ], [ %inc, %for.cond ]
|
252
|
40 %sum.reload = load i32, ptr %sum
|
150
|
41 %mul = mul nsw i32 %i1.0, 3
|
|
42 %add = add nsw i32 %sum.reload, %mul
|
|
43 %inc = add nsw i32 %i1.0, 1
|
252
|
44 store i32 %add, ptr %sum
|
150
|
45 %cmp = icmp slt i32 %i1.0, 100
|
|
46 br i1 %cmp, label %for.cond, label %for.end
|
|
47
|
|
48 for.end: ; preds = %for.cond
|
|
49 ret void
|
|
50 }
|
|
51
|
|
52
|
252
|
53 define void @f2(ptr %sum) {
|
150
|
54 entry:
|
|
55 br label %entry.split1
|
|
56
|
|
57 entry.split1: ; preds = %entry
|
|
58 br label %entry.split
|
|
59
|
|
60 entry.split: ; preds = %entry.split1
|
|
61 br label %for.cond
|
|
62
|
|
63 for.cond: ; preds = %for.cond, %entry.split
|
|
64 %i1.0 = phi i32 [ 0, %entry.split ], [ %inc, %for.cond ]
|
252
|
65 %sum.reload = load i32, ptr %sum
|
150
|
66 %mul = mul nsw i32 %i1.0, 3
|
|
67 %add = add nsw i32 %sum.reload, %mul
|
|
68 %inc = add nsw i32 %i1.0, 1
|
252
|
69 store i32 %add, ptr %sum
|
150
|
70 %cmp = icmp slt i32 %i1.0, 100
|
|
71 br i1 %cmp, label %for.cond, label %for.end
|
|
72
|
|
73 for.end: ; preds = %for.cond
|
|
74 ret void
|
|
75 }
|
|
76
|
252
|
77 define void @g1(ptr %sum) {
|
150
|
78 entry:
|
|
79 br label %entry.split1
|
|
80
|
|
81 entry.split1: ; preds = %entry
|
|
82 br label %entry.split
|
|
83
|
|
84 entry.split: ; preds = %entry.split1
|
|
85 br label %for.cond
|
|
86
|
|
87 for.cond: ; preds = %for.cond, %entry.split
|
|
88 %i1.0 = phi i32 [ 0, %entry.split ], [ %inc, %for.cond ]
|
252
|
89 %sum.reload = load i32, ptr %sum
|
150
|
90 %mul = mul nsw i32 %i1.0, 3
|
|
91 %add = add nsw i32 %sum.reload, %mul
|
|
92 %inc = add nsw i32 %i1.0, 1
|
252
|
93 store i32 %add, ptr %sum
|
150
|
94 %cmp = icmp slt i32 %i1.0, 100
|
|
95 br i1 %cmp, label %for.cond, label %for.end
|
|
96
|
|
97 for.end: ; preds = %for.cond
|
|
98 ret void
|
|
99 }
|
|
100
|
252
|
101 define void @h(ptr %sum) {
|
150
|
102 entry:
|
|
103 br label %entry.split1
|
|
104
|
|
105 entry.split1: ; preds = %entry
|
|
106 br label %entry.split
|
|
107
|
|
108 entry.split: ; preds = %entry.split1
|
|
109 br label %for.cond
|
|
110
|
|
111 for.cond: ; preds = %for.cond, %entry.split
|
|
112 %i1.0 = phi i32 [ 0, %entry.split ], [ %inc, %for.cond ]
|
252
|
113 %sum.reload = load i32, ptr %sum
|
150
|
114 %mul = mul nsw i32 %i1.0, 3
|
|
115 %add = add nsw i32 %sum.reload, %mul
|
|
116 %inc = add nsw i32 %i1.0, 1
|
252
|
117 store i32 %add, ptr %sum
|
150
|
118 %cmp = icmp slt i32 %i1.0, 100
|
|
119 br i1 %cmp, label %for.cond, label %for.end
|
|
120
|
|
121 for.end: ; preds = %for.cond
|
|
122 ret void
|
|
123 }
|
|
124
|