Skip to content

Commit 970bf07

Browse files
[clang][CodeGen] Ensure consistent mustprogress attribute emission
Emission of `mustprogress` attribute previously occurred only within `EmitFunctionBody`, after generating the function body. Other routines for function body creation may lack the attribute, potentially leading to suboptimal optimizations later in the pipeline. Attribute emission is now anticipated prior to generating the function body. Fixes: llvm/llvm-project#69833.
1 parent bafd35c commit 970bf07

16 files changed

+162
-164
lines changed

clang/lib/CodeGen/CodeGenFunction.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,11 +1262,6 @@ void CodeGenFunction::EmitFunctionBody(const Stmt *Body) {
12621262
EmitCompoundStmtWithoutScope(*S);
12631263
else
12641264
EmitStmt(Body);
1265-
1266-
// This is checked after emitting the function body so we know if there
1267-
// are any permitted infinite loops.
1268-
if (checkIfFunctionMustProgress())
1269-
CurFn->addFnAttr(llvm::Attribute::MustProgress);
12701265
}
12711266

12721267
/// When instrumenting to collect profile data, the counts for some blocks
@@ -1445,6 +1440,11 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn,
14451440
if (Body && isa_and_nonnull<CoroutineBodyStmt>(Body))
14461441
llvm::append_range(FnArgs, FD->parameters());
14471442

1443+
// Ensure that the function adheres to the forward progress guarantee, which
1444+
// is required by certain optimizations.
1445+
if (checkIfFunctionMustProgress())
1446+
CurFn->addFnAttr(llvm::Attribute::MustProgress);
1447+
14481448
// Generate the body of the function.
14491449
PGO.assignRegionCounters(GD, CurFn);
14501450
if (isa<CXXDestructorDecl>(FD))

clang/test/CXX/special/class.dtor/p3-0x.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,4 +176,4 @@ struct TVC : VX
176176
template <typename T>
177177
TVC<T>::~TVC() {}
178178

179-
// CHECK: attributes [[ATTRGRP]] = { noinline nounwind{{.*}} }
179+
// CHECK: attributes [[ATTRGRP]] = { mustprogress noinline nounwind{{.*}} }

clang/test/CodeGen/fp-floatcontrol-stack.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ float fun_default FUN(1)
224224
#endif
225225
float y();
226226
// CHECK-DDEFAULT: Function Attrs: mustprogress noinline nounwind optnone{{$$}}
227-
// CHECK-DEBSTRICT: Function Attrs: noinline nounwind optnone strictfp{{$$}}
227+
// CHECK-DEBSTRICT: Function Attrs: mustprogress noinline nounwind optnone strictfp{{$$}}
228228
// CHECK-FAST: Function Attrs: mustprogress noinline nounwind optnone{{$$}}
229229
// CHECK-NOHONOR: Function Attrs: mustprogress noinline nounwind optnone{{$$}}
230230
class ON {
@@ -246,10 +246,10 @@ class ON {
246246
};
247247
ON on;
248248
#pragma float_control(except, off)
249-
// CHECK-DDEFAULT: Function Attrs: noinline nounwind optnone{{$$}}
250-
// CHECK-DEBSTRICT: Function Attrs: noinline nounwind optnone{{$$}}
251-
// CHECK-FAST: Function Attrs: noinline nounwind optnone{{$$}}
252-
// CHECK-NOHONOR: Function Attrs: noinline nounwind optnone{{$$}}
249+
// CHECK-DDEFAULT: Function Attrs: mustprogress noinline nounwind optnone{{$$}}
250+
// CHECK-DEBSTRICT: Function Attrs: mustprogress noinline nounwind optnone{{$$}}
251+
// CHECK-FAST: Function Attrs: mustprogress noinline nounwind optnone{{$$}}
252+
// CHECK-NOHONOR: Function Attrs: mustprogress noinline nounwind optnone{{$$}}
253253
class OFF {
254254
float w = 2 + y() * 7;
255255
// CHECK-LABEL: define {{.*}} void @_ZN3OFFC2Ev{{.*}}

clang/test/CodeGen/no-builtin.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,23 @@ extern "C" void call_b_foo(B *b) {
4242

4343
// CHECK-LABEL: define{{.*}} void @call_foo_no_mempcy() #3
4444
extern "C" void call_foo_no_mempcy() {
45-
// CHECK: call void @foo_no_mempcy() #7
45+
// CHECK: call void @foo_no_mempcy() #6
4646
foo_no_mempcy(); // call gets annotated with "no-builtin-memcpy"
4747
}
4848

4949
A::~A() {} // Anchoring A so A::foo() gets generated
5050
B::~B() {} // Anchoring B so B::foo() gets generated
5151

5252
// CHECK-LABEL: define linkonce_odr noundef i32 @_ZNK1A3fooEv(ptr noundef{{[^,]*}} %this) unnamed_addr #0 comdat align 2
53-
// CHECK-LABEL: define linkonce_odr noundef i32 @_ZNK1B3fooEv(ptr noundef{{[^,]*}} %this) unnamed_addr #6 comdat align 2
53+
// CHECK-LABEL: define linkonce_odr noundef i32 @_ZNK1B3fooEv(ptr noundef{{[^,]*}} %this) unnamed_addr #5 comdat align 2
5454

5555
// CHECK: attributes #0 = {{{.*}}"no-builtin-memcpy"{{.*}}}
5656
// CHECK-NOT: attributes #0 = {{{.*}}"no-builtin-memmove"{{.*}}}
5757
// CHECK-NOT: attributes #0 = {{{.*}}"no-builtin-memset"{{.*}}}
5858
// CHECK: attributes #1 = {{{.*}}"no-builtins"{{.*}}}
5959
// CHECK: attributes #2 = {{{.*}}"no-builtin-memcpy"{{.*}}"no-builtin-memset"{{.*}}}
6060
// CHECK-NOT: attributes #2 = {{{.*}}"no-builtin-memmove"{{.*}}}
61-
// CHECK: attributes #6 = {{{.*}}"no-builtin-memmove"{{.*}}}
61+
// CHECK: attributes #6 = {{{.*}}"no-builtin-memcpy"{{.*}}}
6262
// CHECK-NOT: attributes #5 = {{{.*}}"no-builtin-memcpy"{{.*}}}
6363
// CHECK-NOT: attributes #5 = {{{.*}}"no-builtin-memset"{{.*}}}
64-
// CHECK: attributes #7 = { "no-builtin-memcpy" }
64+
// CHECK: attributes #8 = { builtin nounwind }

clang/test/CodeGenCXX/apple-kext.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ namespace test0 {
3838
// CHECK: call void @_ZN5test01AD1Ev(ptr @_ZN5test01aE)
3939
// CHECK-NEXT: ret void
4040

41-
// CHECK: attributes #[[ATTR0]] = { alwaysinline nounwind {{.*}} }
42-
// CHECK: attributes #[[ATTR1]] = { noinline nounwind {{.*}} }
41+
// CHECK: attributes #[[ATTR0]] = { alwaysinline mustprogress nounwind {{.*}} }
42+
// CHECK: attributes #[[ATTR1]] = { mustprogress noinline nounwind {{.*}} }

clang/test/OpenMP/assumes_codegen.cpp

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -115,29 +115,29 @@ int lambda_outer() {
115115
// CHECK: define{{.*}} void @_Z3barv()
116116
// CHECK-SAME: [[attr1:#[0-9]]]
117117
// CHECK: call{{.*}} @_ZN3BARC1Ev(ptr{{.*}} %b)
118-
// CHECK-SAME: [[attr9:#[0-9]]]
118+
// CHECK-SAME: [[attr8:#[0-9]]]
119119
// CHECK: define{{.*}} void @_ZN3BARC1Ev(ptr{{.*}} %this)
120-
// CHECK-SAME: [[attr2:#[0-9]]]
120+
// CHECK-SAME: [[attr1:#[0-9]]]
121121
// CHECK: call{{.*}} @_ZN3BARC2Ev(ptr{{.*}} %this1)
122-
// CHECK-SAME: [[attr9]]
122+
// CHECK-SAME: [[attr8]]
123123
// CHECK: define{{.*}} void @_ZN3BARC2Ev(ptr{{.*}} %this)
124-
// CHECK-SAME: [[attr3:#[0-9]]]
124+
// CHECK-SAME: [[attr2:#[0-9]]]
125125
// CHECK: define{{.*}} void @_Z3bazv()
126-
// CHECK-SAME: [[attr4:#[0-9]]]
126+
// CHECK-SAME: [[attr3:#[0-9]]]
127127
// CHECK: call{{.*}} @_ZN3BAZIfEC1Ev(ptr{{.*}} %b)
128-
// CHECK-SAME: [[attr10:#[0-9]]]
128+
// CHECK-SAME: [[attr9:#[0-9]]]
129129
// CHECK: define{{.*}} void @_ZN3BAZIfEC1Ev(ptr{{.*}} %this)
130-
// CHECK-SAME: [[attr5:#[0-9]]]
130+
// CHECK-SAME: [[attr4:#[0-9]]]
131131
// CHECK: call{{.*}} @_ZN3BAZIfEC2Ev(ptr{{.*}} %this1)
132-
// CHECK-SAME: [[attr10]]
132+
// CHECK-SAME: [[attr9]]
133133
// CHECK: define{{.*}} void @_ZN3BAZIfEC2Ev(ptr{{.*}} %this)
134-
// CHECK-SAME: [[attr6:#[0-9]]]
134+
// CHECK-SAME: [[attr5:#[0-9]]]
135135
// CHECK: define{{.*}} i32 @_Z12lambda_outerv()
136-
// CHECK-SAME: [[attr7:#[0-9]]]
136+
// CHECK-SAME: [[attr6:#[0-9]]]
137137
// CHECK: call{{.*}} @"_ZZ12lambda_outervENK3$_0clEv"
138-
// CHECK-SAME: [[attr11:#[0-9]]]
138+
// CHECK-SAME: [[attr10:#[0-9]]]
139139
// CHECK: define{{.*}} i32 @"_ZZ12lambda_outervENK3$_0clEv"(ptr{{.*}} %this)
140-
// CHECK-SAME: [[attr8:#[0-9]]]
140+
// CHECK-SAME: [[attr7:#[0-9]]]
141141

142142
// CHECK: attributes [[attr0]]
143143
// CHECK-SAME: "llvm.assume"="omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses,omp_no_openmp"
@@ -146,20 +146,18 @@ int lambda_outer() {
146146
// CHECK: attributes [[attr2]]
147147
// CHECK-SAME: "llvm.assume"="ompx_range_bar_only,ompx_range_bar_only_2,omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses,omp_no_openmp"
148148
// CHECK: attributes [[attr3]]
149-
// CHECK-SAME: "llvm.assume"="ompx_range_bar_only,ompx_range_bar_only_2,omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses,omp_no_openmp"
150-
// CHECK: attributes [[attr4]]
151149
// CHECK-SAME: "llvm.assume"="ompx_1234,omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses,omp_no_openmp,ompx_1234,omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses,omp_no_openmp"
150+
// CHECK: attributes [[attr4]]
151+
// CHECK-SAME: "llvm.assume"="ompx_1234,omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses,omp_no_openmp,omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses,omp_no_openmp"
152152
// CHECK: attributes [[attr5]]
153153
// CHECK-SAME: "llvm.assume"="ompx_1234,omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses,omp_no_openmp,omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses,omp_no_openmp"
154154
// CHECK: attributes [[attr6]]
155-
// CHECK-SAME: "llvm.assume"="ompx_1234,omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses,omp_no_openmp,omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses,omp_no_openmp"
155+
// CHECK-SAME: "llvm.assume"="ompx_lambda_assumption,omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses,omp_no_openmp"
156156
// CHECK: attributes [[attr7]]
157157
// CHECK-SAME: "llvm.assume"="ompx_lambda_assumption,omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses,omp_no_openmp"
158158
// CHECK: attributes [[attr8]]
159-
// CHECK-SAME: "llvm.assume"="ompx_lambda_assumption,omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses,omp_no_openmp"
160-
// CHECK: attributes [[attr9]]
161159
// CHECK-SAME: "llvm.assume"="ompx_range_bar_only,ompx_range_bar_only_2,omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses,omp_no_openmp"
162-
// CHECK: attributes [[attr10]]
160+
// CHECK: attributes [[attr9]]
163161
// CHECK-SAME: "llvm.assume"="ompx_1234,omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses,omp_no_openmp,omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses,omp_no_openmp"
164-
// CHECK: attributes [[attr11]]
162+
// CHECK: attributes [[attr10]]
165163
// CHECK-SAME: "llvm.assume"="ompx_lambda_assumption,omp_no_openmp_routines,ompx_another_warning,ompx_after_invalid_clauses,omp_no_openmp"

clang/test/OpenMP/for_firstprivate_codegen.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ int main() {
412412
//
413413
//
414414
// CHECK1-LABEL: define {{[^@]+}}@_Z5tmainIiET_v
415-
// CHECK1-SAME: () #[[ATTR6:[0-9]+]] {
415+
// CHECK1-SAME: () #[[ATTR1]] {
416416
// CHECK1-NEXT: entry:
417417
// CHECK1-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
418418
// CHECK1-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
@@ -514,7 +514,7 @@ int main() {
514514
//
515515
//
516516
// CHECK1-LABEL: define {{[^@]+}}@_Z5tmainIiET_v.omp_outlined
517-
// CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[T_VAR:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[VEC:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[VAR:%.*]]) #[[ATTR7:[0-9]+]] {
517+
// CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[T_VAR:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[VEC:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[VAR:%.*]]) #[[ATTR6:[0-9]+]] {
518518
// CHECK1-NEXT: entry:
519519
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
520520
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
@@ -1013,7 +1013,7 @@ int main() {
10131013
//
10141014
//
10151015
// CHECK4-LABEL: define {{[^@]+}}@__main_block_invoke
1016-
// CHECK4-SAME: (ptr noundef [[DOTBLOCK_DESCRIPTOR:%.*]]) #[[ATTR1]] {
1016+
// CHECK4-SAME: (ptr noundef [[DOTBLOCK_DESCRIPTOR:%.*]]) #[[ATTR4:[0-9]+]] {
10171017
// CHECK4-NEXT: entry:
10181018
// CHECK4-NEXT: [[DOTBLOCK_DESCRIPTOR_ADDR:%.*]] = alloca ptr, align 8
10191019
// CHECK4-NEXT: [[BLOCK_ADDR:%.*]] = alloca ptr, align 8
@@ -1024,7 +1024,7 @@ int main() {
10241024
//
10251025
//
10261026
// CHECK4-LABEL: define {{[^@]+}}@__main_block_invoke.omp_outlined
1027-
// CHECK4-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[SIVAR:%.*]]) #[[ATTR4:[0-9]+]] {
1027+
// CHECK4-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[SIVAR:%.*]]) #[[ATTR5:[0-9]+]] {
10281028
// CHECK4-NEXT: entry:
10291029
// CHECK4-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
10301030
// CHECK4-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
@@ -1129,7 +1129,7 @@ int main() {
11291129
//
11301130
//
11311131
// CHECK4-LABEL: define {{[^@]+}}@var_block_invoke
1132-
// CHECK4-SAME: (ptr noundef [[DOTBLOCK_DESCRIPTOR:%.*]]) #[[ATTR1]] {
1132+
// CHECK4-SAME: (ptr noundef [[DOTBLOCK_DESCRIPTOR:%.*]]) #[[ATTR4]] {
11331133
// CHECK4-NEXT: entry:
11341134
// CHECK4-NEXT: [[DOTBLOCK_DESCRIPTOR_ADDR:%.*]] = alloca ptr, align 8
11351135
// CHECK4-NEXT: [[BLOCK_ADDR:%.*]] = alloca ptr, align 8

clang/test/OpenMP/for_lastprivate_codegen.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ int main() {
835835
//
836836
//
837837
// CHECK1-LABEL: define {{[^@]+}}@_Z5tmainIiET_v
838-
// CHECK1-SAME: () #[[ATTR7:[0-9]+]] {
838+
// CHECK1-SAME: () #[[ATTR1]] {
839839
// CHECK1-NEXT: entry:
840840
// CHECK1-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
841841
// CHECK1-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
@@ -1636,7 +1636,7 @@ int main() {
16361636
//
16371637
//
16381638
// CHECK3-LABEL: define {{[^@]+}}@_ZN2SSC2ERi.omp_outlined
1639-
// CHECK3-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]]) #[[ATTR3:[0-9]+]] {
1639+
// CHECK3-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]]) #[[ATTR2:[0-9]+]] {
16401640
// CHECK3-NEXT: entry:
16411641
// CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
16421642
// CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
@@ -1773,7 +1773,7 @@ int main() {
17731773
//
17741774
//
17751775
// CHECK3-LABEL: define {{[^@]+}}@_ZZN2SSC1ERiENKUlvE_clEv
1776-
// CHECK3-SAME: (ptr noundef nonnull align 8 dereferenceable(32) [[THIS:%.*]]) #[[ATTR2:[0-9]+]] align 2 {
1776+
// CHECK3-SAME: (ptr noundef nonnull align 8 dereferenceable(32) [[THIS:%.*]]) #[[ATTR1]] align 2 {
17771777
// CHECK3-NEXT: entry:
17781778
// CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
17791779
// CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
@@ -1806,7 +1806,7 @@ int main() {
18061806
//
18071807
//
18081808
// CHECK3-LABEL: define {{[^@]+}}@_ZZN2SSC1ERiENKUlvE0_clEv
1809-
// CHECK3-SAME: (ptr noundef nonnull align 8 dereferenceable(16) [[THIS:%.*]]) #[[ATTR2]] align 2 {
1809+
// CHECK3-SAME: (ptr noundef nonnull align 8 dereferenceable(16) [[THIS:%.*]]) #[[ATTR1]] align 2 {
18101810
// CHECK3-NEXT: entry:
18111811
// CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
18121812
// CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
@@ -1845,7 +1845,7 @@ int main() {
18451845
//
18461846
//
18471847
// CHECK3-LABEL: define {{[^@]+}}@_ZZN2SSC1ERiENKUlvE_clEv.omp_outlined
1848-
// CHECK3-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[B:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[C:%.*]]) #[[ATTR3]] {
1848+
// CHECK3-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[B:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[C:%.*]]) #[[ATTR2]] {
18491849
// CHECK3-NEXT: entry:
18501850
// CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
18511851
// CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
@@ -1962,7 +1962,7 @@ int main() {
19621962
//
19631963
//
19641964
// CHECK3-LABEL: define {{[^@]+}}@_ZZN2SSC1ERiENKUlvE0_clEv.omp_outlined
1965-
// CHECK3-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR3]] {
1965+
// CHECK3-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR2]] {
19661966
// CHECK3-NEXT: entry:
19671967
// CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
19681968
// CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
@@ -2105,7 +2105,7 @@ int main() {
21052105
//
21062106
//
21072107
// CHECK4-LABEL: define {{[^@]+}}@__main_block_invoke
2108-
// CHECK4-SAME: (ptr noundef [[DOTBLOCK_DESCRIPTOR:%.*]]) #[[ATTR1]] {
2108+
// CHECK4-SAME: (ptr noundef [[DOTBLOCK_DESCRIPTOR:%.*]]) #[[ATTR2:[0-9]+]] {
21092109
// CHECK4-NEXT: entry:
21102110
// CHECK4-NEXT: [[DOTBLOCK_DESCRIPTOR_ADDR:%.*]] = alloca ptr, align 8
21112111
// CHECK4-NEXT: [[BLOCK_ADDR:%.*]] = alloca ptr, align 8
@@ -2116,7 +2116,7 @@ int main() {
21162116
//
21172117
//
21182118
// CHECK4-LABEL: define {{[^@]+}}@__main_block_invoke.omp_outlined
2119-
// CHECK4-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[SIVAR:%.*]]) #[[ATTR2:[0-9]+]] {
2119+
// CHECK4-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[SIVAR:%.*]]) #[[ATTR3:[0-9]+]] {
21202120
// CHECK4-NEXT: entry:
21212121
// CHECK4-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
21222122
// CHECK4-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
@@ -2232,7 +2232,7 @@ int main() {
22322232
//
22332233
//
22342234
// CHECK4-LABEL: define {{[^@]+}}@g1_block_invoke
2235-
// CHECK4-SAME: (ptr noundef [[DOTBLOCK_DESCRIPTOR:%.*]]) #[[ATTR1]] {
2235+
// CHECK4-SAME: (ptr noundef [[DOTBLOCK_DESCRIPTOR:%.*]]) #[[ATTR2]] {
22362236
// CHECK4-NEXT: entry:
22372237
// CHECK4-NEXT: [[DOTBLOCK_DESCRIPTOR_ADDR:%.*]] = alloca ptr, align 8
22382238
// CHECK4-NEXT: [[BLOCK_ADDR:%.*]] = alloca ptr, align 8
@@ -2345,7 +2345,7 @@ int main() {
23452345
//
23462346
//
23472347
// CHECK4-LABEL: define {{[^@]+}}@_ZN2SSC2ERi.omp_outlined
2348-
// CHECK4-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]]) #[[ATTR2]] {
2348+
// CHECK4-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]]) #[[ATTR3]] {
23492349
// CHECK4-NEXT: entry:
23502350
// CHECK4-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
23512351
// CHECK4-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
@@ -2495,7 +2495,7 @@ int main() {
24952495
//
24962496
//
24972497
// CHECK4-LABEL: define {{[^@]+}}@g1_block_invoke_2
2498-
// CHECK4-SAME: (ptr noundef [[DOTBLOCK_DESCRIPTOR:%.*]]) #[[ATTR1]] {
2498+
// CHECK4-SAME: (ptr noundef [[DOTBLOCK_DESCRIPTOR:%.*]]) #[[ATTR2]] {
24992499
// CHECK4-NEXT: entry:
25002500
// CHECK4-NEXT: [[DOTBLOCK_DESCRIPTOR_ADDR:%.*]] = alloca ptr, align 8
25012501
// CHECK4-NEXT: [[BLOCK_ADDR:%.*]] = alloca ptr, align 8
@@ -2527,7 +2527,7 @@ int main() {
25272527
//
25282528
//
25292529
// CHECK4-LABEL: define {{[^@]+}}@g1_block_invoke_2.omp_outlined
2530-
// CHECK4-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[B:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[C:%.*]]) #[[ATTR2]] {
2530+
// CHECK4-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[B:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[C:%.*]]) #[[ATTR3]] {
25312531
// CHECK4-NEXT: entry:
25322532
// CHECK4-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
25332533
// CHECK4-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
@@ -2644,7 +2644,7 @@ int main() {
26442644
//
26452645
//
26462646
// CHECK4-LABEL: define {{[^@]+}}@___ZN2SSC2ERi_block_invoke
2647-
// CHECK4-SAME: (ptr noundef [[DOTBLOCK_DESCRIPTOR:%.*]]) #[[ATTR1]] {
2647+
// CHECK4-SAME: (ptr noundef [[DOTBLOCK_DESCRIPTOR:%.*]]) #[[ATTR2]] {
26482648
// CHECK4-NEXT: entry:
26492649
// CHECK4-NEXT: [[DOTBLOCK_DESCRIPTOR_ADDR:%.*]] = alloca ptr, align 8
26502650
// CHECK4-NEXT: [[BLOCK_ADDR:%.*]] = alloca ptr, align 8
@@ -2684,7 +2684,7 @@ int main() {
26842684
//
26852685
//
26862686
// CHECK4-LABEL: define {{[^@]+}}@___ZN2SSC2ERi_block_invoke.omp_outlined
2687-
// CHECK4-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR2]] {
2687+
// CHECK4-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR3]] {
26882688
// CHECK4-NEXT: entry:
26892689
// CHECK4-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
26902690
// CHECK4-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
@@ -3277,7 +3277,7 @@ int main() {
32773277
//
32783278
//
32793279
// CHECK5-LABEL: define {{[^@]+}}@_Z5tmainIiET_v
3280-
// CHECK5-SAME: () #[[ATTR7:[0-9]+]] {
3280+
// CHECK5-SAME: () #[[ATTR1]] {
32813281
// CHECK5-NEXT: entry:
32823282
// CHECK5-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
32833283
// CHECK5-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4

0 commit comments

Comments
 (0)