• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt %loadPolly -polly-scops  -analyze -polly-ignore-func=f.*,g.* < %s | FileCheck %s
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; }
26target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"
27
28define void @f1(i32* %sum) {
29entry:
30  br label %entry.split1
31
32entry.split1:                                     ; preds = %entry
33  br label %entry.split
34
35entry.split:                                      ; preds = %entry.split1
36  br label %for.cond
37
38for.cond:                                         ; preds = %for.cond, %entry.split
39  %i1.0 = phi i32 [ 0, %entry.split ], [ %inc, %for.cond ]
40  %sum.reload = load i32, i32* %sum
41  %mul = mul nsw i32 %i1.0, 3
42  %add = add nsw i32 %sum.reload, %mul
43  %inc = add nsw i32 %i1.0, 1
44  store i32 %add, i32* %sum
45  %cmp = icmp slt i32 %i1.0, 100
46  br i1 %cmp, label %for.cond, label %for.end
47
48for.end:                                          ; preds = %for.cond
49  ret void
50}
51
52
53define void @f2(i32* %sum) {
54entry:
55  br label %entry.split1
56
57entry.split1:                                     ; preds = %entry
58  br label %entry.split
59
60entry.split:                                      ; preds = %entry.split1
61  br label %for.cond
62
63for.cond:                                         ; preds = %for.cond, %entry.split
64  %i1.0 = phi i32 [ 0, %entry.split ], [ %inc, %for.cond ]
65  %sum.reload = load i32, i32* %sum
66  %mul = mul nsw i32 %i1.0, 3
67  %add = add nsw i32 %sum.reload, %mul
68  %inc = add nsw i32 %i1.0, 1
69  store i32 %add, i32* %sum
70  %cmp = icmp slt i32 %i1.0, 100
71  br i1 %cmp, label %for.cond, label %for.end
72
73for.end:                                          ; preds = %for.cond
74  ret void
75}
76
77define void @g1(i32* %sum) {
78entry:
79  br label %entry.split1
80
81entry.split1:                                     ; preds = %entry
82  br label %entry.split
83
84entry.split:                                      ; preds = %entry.split1
85  br label %for.cond
86
87for.cond:                                         ; preds = %for.cond, %entry.split
88  %i1.0 = phi i32 [ 0, %entry.split ], [ %inc, %for.cond ]
89  %sum.reload = load i32, i32* %sum
90  %mul = mul nsw i32 %i1.0, 3
91  %add = add nsw i32 %sum.reload, %mul
92  %inc = add nsw i32 %i1.0, 1
93  store i32 %add, i32* %sum
94  %cmp = icmp slt i32 %i1.0, 100
95  br i1 %cmp, label %for.cond, label %for.end
96
97for.end:                                          ; preds = %for.cond
98  ret void
99}
100
101define void @h(i32* %sum) {
102entry:
103  br label %entry.split1
104
105entry.split1:                                     ; preds = %entry
106  br label %entry.split
107
108entry.split:                                      ; preds = %entry.split1
109  br label %for.cond
110
111for.cond:                                         ; preds = %for.cond, %entry.split
112  %i1.0 = phi i32 [ 0, %entry.split ], [ %inc, %for.cond ]
113  %sum.reload = load i32, i32* %sum
114  %mul = mul nsw i32 %i1.0, 3
115  %add = add nsw i32 %sum.reload, %mul
116  %inc = add nsw i32 %i1.0, 1
117  store i32 %add, i32* %sum
118  %cmp = icmp slt i32 %i1.0, 100
119  br i1 %cmp, label %for.cond, label %for.end
120
121for.end:                                          ; preds = %for.cond
122  ret void
123}
124
125