Skip to content

Commit e3d646c

Browse files
author
sstefan1
committed
[Attributor][NFC] applying update_test_checks with --check-attributes
Summary: All tests are updated, except wrapper.ll since it is not working nicely with newly created functions. Reviewers: jdoerfert, uenoku, baziotis, homerdin Subscribers: arphaman, jfb, kuter, bbn, okura, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D84130
1 parent c657602 commit e3d646c

90 files changed

Lines changed: 6554 additions & 2638 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎llvm/test/Transforms/Attributor/ArgumentPromotion/2008-02-01-ReturnAttrs.ll‎

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes --check-attributes
22
; RUN: opt -attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=6 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
33
; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=6 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
44
; RUN: opt -attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
55
; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
66

77
define internal i32 @deref(i32* %x) nounwind {
8+
; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
89
; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@deref
910
; IS__TUNIT_OPM-SAME: (i32* noalias nocapture nofree nonnull readonly align 4 dereferenceable(4) [[X:%.*]])
1011
; IS__TUNIT_OPM-NEXT: entry:
1112
; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[X]], align 4
1213
; IS__TUNIT_OPM-NEXT: ret i32 [[TMP2]]
1314
;
15+
; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
1416
; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@deref
1517
; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]])
1618
; IS__TUNIT_NPM-NEXT: entry:
@@ -19,6 +21,7 @@ define internal i32 @deref(i32* %x) nounwind {
1921
; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[X_PRIV]], align 4
2022
; IS__TUNIT_NPM-NEXT: ret i32 [[TMP2]]
2123
;
24+
; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
2225
; IS__CGSCC____-LABEL: define {{[^@]+}}@deref
2326
; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[X:%.*]])
2427
; IS__CGSCC____-NEXT: entry:
@@ -31,14 +34,16 @@ entry:
3134
}
3235

3336
define i32 @f(i32 %x) {
34-
; NOT_TUNIT_NPM-LABEL: define {{[^@]+}}@f
35-
; NOT_TUNIT_NPM-SAME: (i32 [[X:%.*]])
36-
; NOT_TUNIT_NPM-NEXT: entry:
37-
; NOT_TUNIT_NPM-NEXT: [[X_ADDR:%.*]] = alloca i32, align 4
38-
; NOT_TUNIT_NPM-NEXT: store i32 [[X]], i32* [[X_ADDR]], align 4
39-
; NOT_TUNIT_NPM-NEXT: [[TMP1:%.*]] = call i32 @deref(i32* noalias nocapture nofree nonnull readonly align 4 dereferenceable(4) [[X_ADDR]])
40-
; NOT_TUNIT_NPM-NEXT: ret i32 [[TMP1]]
37+
; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn
38+
; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@f
39+
; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]])
40+
; IS__TUNIT_OPM-NEXT: entry:
41+
; IS__TUNIT_OPM-NEXT: [[X_ADDR:%.*]] = alloca i32, align 4
42+
; IS__TUNIT_OPM-NEXT: store i32 [[X]], i32* [[X_ADDR]], align 4
43+
; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = call i32 @deref(i32* noalias nocapture nofree nonnull readonly align 4 dereferenceable(4) [[X_ADDR]])
44+
; IS__TUNIT_OPM-NEXT: ret i32 [[TMP1]]
4145
;
46+
; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
4247
; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@f
4348
; IS__TUNIT_NPM-SAME: (i32 [[X:%.*]])
4449
; IS__TUNIT_NPM-NEXT: entry:
@@ -48,6 +53,15 @@ define i32 @f(i32 %x) {
4853
; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = call i32 @deref(i32 [[TMP0]])
4954
; IS__TUNIT_NPM-NEXT: ret i32 [[TMP1]]
5055
;
56+
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
57+
; IS__CGSCC____-LABEL: define {{[^@]+}}@f
58+
; IS__CGSCC____-SAME: (i32 [[X:%.*]])
59+
; IS__CGSCC____-NEXT: entry:
60+
; IS__CGSCC____-NEXT: [[X_ADDR:%.*]] = alloca i32, align 4
61+
; IS__CGSCC____-NEXT: store i32 [[X]], i32* [[X_ADDR]], align 4
62+
; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @deref(i32* noalias nocapture nofree nonnull readonly align 4 dereferenceable(4) [[X_ADDR]])
63+
; IS__CGSCC____-NEXT: ret i32 [[TMP1]]
64+
;
5165
entry:
5266
%x_addr = alloca i32
5367
store i32 %x, i32* %x_addr, align 4

‎llvm/test/Transforms/Attributor/ArgumentPromotion/2008-07-02-array-indexing.ll‎

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes --check-attributes
22
; RUN: opt -attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
33
; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
44
; RUN: opt -attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
@@ -9,17 +9,31 @@
99
; because there is a load of %A in the entry block
1010
define internal i32 @callee(i1 %C, i32* %A) {
1111
;
12-
; CHECK-LABEL: define {{[^@]+}}@callee
13-
; CHECK-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[A:%.*]])
14-
; CHECK-NEXT: entry:
15-
; CHECK-NEXT: [[A_0:%.*]] = load i32, i32* [[A]], align 4
16-
; CHECK-NEXT: br label [[F:%.*]]
17-
; CHECK: T:
18-
; CHECK-NEXT: unreachable
19-
; CHECK: F:
20-
; CHECK-NEXT: [[A_2:%.*]] = getelementptr i32, i32* [[A]], i32 2
21-
; CHECK-NEXT: [[R:%.*]] = load i32, i32* [[A_2]], align 4
22-
; CHECK-NEXT: ret i32 [[R]]
12+
; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
13+
; IS__TUNIT____-LABEL: define {{[^@]+}}@callee
14+
; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[A:%.*]])
15+
; IS__TUNIT____-NEXT: entry:
16+
; IS__TUNIT____-NEXT: [[A_0:%.*]] = load i32, i32* [[A]], align 4
17+
; IS__TUNIT____-NEXT: br label [[F:%.*]]
18+
; IS__TUNIT____: T:
19+
; IS__TUNIT____-NEXT: unreachable
20+
; IS__TUNIT____: F:
21+
; IS__TUNIT____-NEXT: [[A_2:%.*]] = getelementptr i32, i32* [[A]], i32 2
22+
; IS__TUNIT____-NEXT: [[R:%.*]] = load i32, i32* [[A_2]], align 4
23+
; IS__TUNIT____-NEXT: ret i32 [[R]]
24+
;
25+
; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
26+
; IS__CGSCC____-LABEL: define {{[^@]+}}@callee
27+
; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[A:%.*]])
28+
; IS__CGSCC____-NEXT: entry:
29+
; IS__CGSCC____-NEXT: [[A_0:%.*]] = load i32, i32* [[A]], align 4
30+
; IS__CGSCC____-NEXT: br label [[F:%.*]]
31+
; IS__CGSCC____: T:
32+
; IS__CGSCC____-NEXT: unreachable
33+
; IS__CGSCC____: F:
34+
; IS__CGSCC____-NEXT: [[A_2:%.*]] = getelementptr i32, i32* [[A]], i32 2
35+
; IS__CGSCC____-NEXT: [[R:%.*]] = load i32, i32* [[A_2]], align 4
36+
; IS__CGSCC____-NEXT: ret i32 [[R]]
2337
;
2438
entry:
2539
; Unconditonally load the element at %A
@@ -37,11 +51,13 @@ F:
3751
}
3852

3953
define i32 @foo(i32* %A) {
54+
; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
4055
; IS__TUNIT____-LABEL: define {{[^@]+}}@foo
4156
; IS__TUNIT____-SAME: (i32* nocapture nofree readonly [[A:%.*]])
4257
; IS__TUNIT____-NEXT: [[X:%.*]] = call i32 @callee(i32* nocapture nofree readonly align 4 [[A]])
4358
; IS__TUNIT____-NEXT: ret i32 [[X]]
4459
;
60+
; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
4561
; IS__CGSCC____-LABEL: define {{[^@]+}}@foo
4662
; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[A:%.*]])
4763
; IS__CGSCC____-NEXT: [[X:%.*]] = call i32 @callee(i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[A]])

‎llvm/test/Transforms/Attributor/ArgumentPromotion/2008-09-07-CGUpdate.ll‎

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes --check-attributes
22
; RUN: opt -attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
33
; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
44
; RUN: opt -attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
55
; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
66

77
define internal fastcc i32 @hash(i32* %ts, i32 %mod) nounwind {
8+
; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
89
; IS__CGSCC____-LABEL: define {{[^@]+}}@hash()
910
; IS__CGSCC____-NEXT: entry:
1011
; IS__CGSCC____-NEXT: unreachable
@@ -14,10 +15,17 @@ entry:
1415
}
1516

1617
define void @encode(i32* %m, i32* %ts, i32* %new) nounwind {
17-
; CHECK-LABEL: define {{[^@]+}}@encode
18-
; CHECK-SAME: (i32* nocapture nofree readnone [[M:%.*]], i32* nocapture nofree readnone [[TS:%.*]], i32* nocapture nofree readnone [[NEW:%.*]])
19-
; CHECK-NEXT: entry:
20-
; CHECK-NEXT: unreachable
18+
; IS__TUNIT____: Function Attrs: nofree noreturn nosync nounwind readnone willreturn
19+
; IS__TUNIT____-LABEL: define {{[^@]+}}@encode
20+
; IS__TUNIT____-SAME: (i32* nocapture nofree readnone [[M:%.*]], i32* nocapture nofree readnone [[TS:%.*]], i32* nocapture nofree readnone [[NEW:%.*]])
21+
; IS__TUNIT____-NEXT: entry:
22+
; IS__TUNIT____-NEXT: unreachable
23+
;
24+
; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn
25+
; IS__CGSCC____-LABEL: define {{[^@]+}}@encode
26+
; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[M:%.*]], i32* nocapture nofree readnone [[TS:%.*]], i32* nocapture nofree readnone [[NEW:%.*]])
27+
; IS__CGSCC____-NEXT: entry:
28+
; IS__CGSCC____-NEXT: unreachable
2129
;
2230
entry:
2331
%0 = call fastcc i32 @hash( i32* %ts, i32 0 ) nounwind ; <i32> [#uses=0]

‎llvm/test/Transforms/Attributor/ArgumentPromotion/2008-09-08-CGUpdateSelfEdge.ll‎

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes --check-attributes
22
; RUN: opt -attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
33
; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
44
; RUN: opt -attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
55
; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
66

77
define internal fastcc i32 @term_SharingList(i32* %Term, i32* %List) nounwind {
8+
; IS__TUNIT____: Function Attrs: nounwind
89
; IS__TUNIT____-LABEL: define {{[^@]+}}@term_SharingList
910
; IS__TUNIT____-SAME: (i32* [[TERM:%.*]], i32* [[LIST:%.*]])
1011
; IS__TUNIT____-NEXT: entry:
@@ -15,6 +16,7 @@ define internal fastcc i32 @term_SharingList(i32* %Term, i32* %List) nounwind {
1516
; IS__TUNIT____: bb5:
1617
; IS__TUNIT____-NEXT: ret i32 0
1718
;
19+
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
1820
; IS__CGSCC____-LABEL: define {{[^@]+}}@term_SharingList()
1921
; IS__CGSCC____-NEXT: entry:
2022
; IS__CGSCC____-NEXT: br i1 false, label [[BB:%.*]], label [[BB5:%.*]]
@@ -35,14 +37,25 @@ bb5: ; preds = %entry
3537
}
3638

3739
define i32 @term_Sharing(i32* %Term) nounwind {
38-
; CHECK-LABEL: define {{[^@]+}}@term_Sharing
39-
; CHECK-SAME: (i32* nocapture nofree readnone [[TERM:%.*]])
40-
; CHECK-NEXT: entry:
41-
; CHECK-NEXT: br i1 false, label [[BB_I:%.*]], label [[BB14:%.*]]
42-
; CHECK: bb.i:
43-
; CHECK-NEXT: unreachable
44-
; CHECK: bb14:
45-
; CHECK-NEXT: ret i32 0
40+
; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn
41+
; IS__TUNIT____-LABEL: define {{[^@]+}}@term_Sharing
42+
; IS__TUNIT____-SAME: (i32* nocapture nofree readnone [[TERM:%.*]])
43+
; IS__TUNIT____-NEXT: entry:
44+
; IS__TUNIT____-NEXT: br i1 false, label [[BB_I:%.*]], label [[BB14:%.*]]
45+
; IS__TUNIT____: bb.i:
46+
; IS__TUNIT____-NEXT: unreachable
47+
; IS__TUNIT____: bb14:
48+
; IS__TUNIT____-NEXT: ret i32 0
49+
;
50+
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
51+
; IS__CGSCC____-LABEL: define {{[^@]+}}@term_Sharing
52+
; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[TERM:%.*]])
53+
; IS__CGSCC____-NEXT: entry:
54+
; IS__CGSCC____-NEXT: br i1 false, label [[BB_I:%.*]], label [[BB14:%.*]]
55+
; IS__CGSCC____: bb.i:
56+
; IS__CGSCC____-NEXT: unreachable
57+
; IS__CGSCC____: bb14:
58+
; IS__CGSCC____-NEXT: ret i32 0
4659
;
4760
entry:
4861
br i1 false, label %bb.i, label %bb14

‎llvm/test/Transforms/Attributor/ArgumentPromotion/aggregate-promote.ll‎

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes --check-attributes
22
; RUN: opt -attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
33
; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
44
; RUN: opt -attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
@@ -8,14 +8,25 @@
88
@G = constant %T { i32 0, i32 0, i32 17, i32 25 }
99

1010
define internal i32 @test(%T* %p) {
11-
; CHECK-LABEL: define {{[^@]+}}@test()
12-
; CHECK-NEXT: entry:
13-
; CHECK-NEXT: [[A_GEP:%.*]] = getelementptr [[T:%.*]], %T* @G, i64 0, i32 3
14-
; CHECK-NEXT: [[B_GEP:%.*]] = getelementptr [[T]], %T* @G, i64 0, i32 2
15-
; CHECK-NEXT: [[A:%.*]] = load i32, i32* [[A_GEP]], align 4
16-
; CHECK-NEXT: [[B:%.*]] = load i32, i32* [[B_GEP]], align 4
17-
; CHECK-NEXT: [[V:%.*]] = add i32 [[A]], [[B]]
18-
; CHECK-NEXT: ret i32 [[V]]
11+
; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn
12+
; IS__TUNIT____-LABEL: define {{[^@]+}}@test()
13+
; IS__TUNIT____-NEXT: entry:
14+
; IS__TUNIT____-NEXT: [[A_GEP:%.*]] = getelementptr [[T:%.*]], %T* @G, i64 0, i32 3
15+
; IS__TUNIT____-NEXT: [[B_GEP:%.*]] = getelementptr [[T]], %T* @G, i64 0, i32 2
16+
; IS__TUNIT____-NEXT: [[A:%.*]] = load i32, i32* [[A_GEP]], align 4
17+
; IS__TUNIT____-NEXT: [[B:%.*]] = load i32, i32* [[B_GEP]], align 4
18+
; IS__TUNIT____-NEXT: [[V:%.*]] = add i32 [[A]], [[B]]
19+
; IS__TUNIT____-NEXT: ret i32 [[V]]
20+
;
21+
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
22+
; IS__CGSCC____-LABEL: define {{[^@]+}}@test()
23+
; IS__CGSCC____-NEXT: entry:
24+
; IS__CGSCC____-NEXT: [[A_GEP:%.*]] = getelementptr [[T:%.*]], %T* @G, i64 0, i32 3
25+
; IS__CGSCC____-NEXT: [[B_GEP:%.*]] = getelementptr [[T]], %T* @G, i64 0, i32 2
26+
; IS__CGSCC____-NEXT: [[A:%.*]] = load i32, i32* [[A_GEP]], align 4
27+
; IS__CGSCC____-NEXT: [[B:%.*]] = load i32, i32* [[B_GEP]], align 4
28+
; IS__CGSCC____-NEXT: [[V:%.*]] = add i32 [[A]], [[B]]
29+
; IS__CGSCC____-NEXT: ret i32 [[V]]
1930
;
2031
entry:
2132
%a.gep = getelementptr %T, %T* %p, i64 0, i32 3
@@ -27,10 +38,17 @@ entry:
2738
}
2839

2940
define i32 @caller() {
30-
; CHECK-LABEL: define {{[^@]+}}@caller()
31-
; CHECK-NEXT: entry:
32-
; CHECK-NEXT: [[V:%.*]] = call i32 @test()
33-
; CHECK-NEXT: ret i32 [[V]]
41+
; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn
42+
; IS__TUNIT____-LABEL: define {{[^@]+}}@caller()
43+
; IS__TUNIT____-NEXT: entry:
44+
; IS__TUNIT____-NEXT: [[V:%.*]] = call i32 @test()
45+
; IS__TUNIT____-NEXT: ret i32 [[V]]
46+
;
47+
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
48+
; IS__CGSCC____-LABEL: define {{[^@]+}}@caller()
49+
; IS__CGSCC____-NEXT: entry:
50+
; IS__CGSCC____-NEXT: [[V:%.*]] = call i32 @test()
51+
; IS__CGSCC____-NEXT: ret i32 [[V]]
3452
;
3553
entry:
3654
%v = call i32 @test(%T* @G)

0 commit comments

Comments
 (0)