Skip to content

Commit edf634e

Browse files
committed
[AssumeBundles] Add nonnull/align to op bundle if noundef exists
This is a patch to add nonnull and align to assume's operand bundle only if noundef exists. Since nonnull and align in fn attr have poison semantics, they should be paired with noundef or noundef-implying attributes to be immediate UB. Reviewed By: jdoerfert, Tyker Differential Revision: https://reviews.llvm.org/D98228
1 parent 0035dec commit edf634e

File tree

4 files changed

+82
-38
lines changed

4 files changed

+82
-38
lines changed

llvm/lib/Transforms/Utils/AssumeBundleBuilder.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,12 @@ struct AssumeBuilderState {
204204
auto addAttrList = [&](AttributeList AttrList) {
205205
for (unsigned Idx = AttributeList::FirstArgIndex;
206206
Idx < AttrList.getNumAttrSets(); Idx++)
207-
for (Attribute Attr : AttrList.getAttributes(Idx))
208-
addAttribute(Attr, Call->getArgOperand(Idx - 1));
207+
for (Attribute Attr : AttrList.getAttributes(Idx)) {
208+
bool IsPoisonAttr = Attr.hasAttribute(Attribute::NonNull) ||
209+
Attr.hasAttribute(Attribute::Alignment);
210+
if (!IsPoisonAttr || Call->isPassingUndefUB(Idx - 1))
211+
addAttribute(Attr, Call->getArgOperand(Idx - 1));
212+
}
209213
for (Attribute Attr : AttrList.getFnAttributes())
210214
addAttribute(Attr, nullptr);
211215
};
Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature
12
; REQUIRES: asserts
23

3-
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature
44
; RUN: opt -passes='assume-builder,verify' --enable-knowledge-retention --debug-counter=assume-builder-counter-skip=5,assume-builder-counter-count=1 -S %s | FileCheck %s --check-prefixes=COUNTER1
55
; RUN: opt -passes='assume-builder,verify' --enable-knowledge-retention --debug-counter=assume-builder-counter-skip=1,assume-builder-counter-count=3 -S %s | FileCheck %s --check-prefixes=COUNTER2
66
; RUN: opt -passes='assume-builder,verify' --enable-knowledge-retention --debug-counter=assume-builder-counter-skip=2,assume-builder-counter-count=200 -S %s | FileCheck %s --check-prefixes=COUNTER3
@@ -12,59 +12,69 @@ declare void @func_cold(i32*) cold willreturn nounwind
1212
declare void @func_strbool(i32*) "no-jump-tables"
1313
declare void @func_many(i32*) "no-jump-tables" nounwind "less-precise-fpmad" willreturn norecurse
1414
declare void @func_argattr(i32* align 8, i32* nonnull) nounwind
15+
declare void @func_argattr2(i32* noundef align 8, i32* noundef nonnull) nounwind
1516
declare void @may_throw()
1617

1718
define void @test(i32* %P, i32* %P1, i32* %P2, i32* %P3) {
1819
; COUNTER1-LABEL: define {{[^@]+}}@test
19-
; COUNTER1-SAME: (i32* [[P:%.*]], i32* [[P1:%.*]], i32* [[P2:%.*]], i32* [[P3:%.*]])
20+
; COUNTER1-SAME: (i32* [[P:%.*]], i32* [[P1:%.*]], i32* [[P2:%.*]], i32* [[P3:%.*]]) {
2021
; COUNTER1-NEXT: call void @func(i32* nonnull dereferenceable(16) [[P]], i32* null)
2122
; COUNTER1-NEXT: call void @func(i32* dereferenceable(12) [[P1]], i32* nonnull [[P]])
22-
; COUNTER1-NEXT: call void @func_cold(i32* dereferenceable(12) [[P1]]) #5
23+
; COUNTER1-NEXT: call void @func_cold(i32* dereferenceable(12) [[P1]]) [[ATTR5:#.*]]
2324
; COUNTER1-NEXT: call void @func_cold(i32* dereferenceable(12) [[P1]])
2425
; COUNTER1-NEXT: call void @func(i32* [[P1]], i32* [[P]])
2526
; COUNTER1-NEXT: call void @func_strbool(i32* [[P1]])
2627
; COUNTER1-NEXT: call void @func(i32* dereferenceable(32) [[P]], i32* dereferenceable(8) [[P]])
27-
; COUNTER1-NEXT: call void @llvm.assume(i1 true) [ "align"(i32* [[P1]], i64 8) ]
2828
; COUNTER1-NEXT: call void @func_many(i32* align 8 [[P1]])
29+
; COUNTER1-NEXT: call void @llvm.assume(i1 true) [ "noundef"(i32* [[P1]]), "align"(i32* [[P1]], i64 8) ]
30+
; COUNTER1-NEXT: call void @func_many(i32* noundef align 8 [[P1]])
2931
; COUNTER1-NEXT: call void @func_argattr(i32* [[P2]], i32* [[P3]])
32+
; COUNTER1-NEXT: call void @func_argattr2(i32* [[P2]], i32* [[P3]])
3033
; COUNTER1-NEXT: call void @func(i32* nonnull [[P1]], i32* nonnull [[P]])
34+
; COUNTER1-NEXT: call void @func(i32* noundef nonnull [[P1]], i32* noundef nonnull [[P]])
3135
; COUNTER1-NEXT: ret void
3236
;
3337
; COUNTER2-LABEL: define {{[^@]+}}@test
34-
; COUNTER2-SAME: (i32* [[P:%.*]], i32* [[P1:%.*]], i32* [[P2:%.*]], i32* [[P3:%.*]])
38+
; COUNTER2-SAME: (i32* [[P:%.*]], i32* [[P1:%.*]], i32* [[P2:%.*]], i32* [[P3:%.*]]) {
3539
; COUNTER2-NEXT: call void @func(i32* nonnull dereferenceable(16) [[P]], i32* null)
36-
; COUNTER2-NEXT: call void @llvm.assume(i1 true) [ "dereferenceable"(i32* [[P1]], i64 12), "nonnull"(i32* [[P]]) ]
40+
; COUNTER2-NEXT: call void @llvm.assume(i1 true) [ "dereferenceable"(i32* [[P1]], i64 12) ]
3741
; COUNTER2-NEXT: call void @func(i32* dereferenceable(12) [[P1]], i32* nonnull [[P]])
3842
; COUNTER2-NEXT: call void @llvm.assume(i1 true) [ "cold"() ]
39-
; COUNTER2-NEXT: call void @func_cold(i32* dereferenceable(12) [[P1]]) #5
43+
; COUNTER2-NEXT: call void @func_cold(i32* dereferenceable(12) [[P1]]) [[ATTR5:#.*]]
4044
; COUNTER2-NEXT: call void @llvm.assume(i1 true) [ "cold"() ]
4145
; COUNTER2-NEXT: call void @func_cold(i32* dereferenceable(12) [[P1]])
4246
; COUNTER2-NEXT: call void @func(i32* [[P1]], i32* [[P]])
4347
; COUNTER2-NEXT: call void @func_strbool(i32* [[P1]])
4448
; COUNTER2-NEXT: call void @func(i32* dereferenceable(32) [[P]], i32* dereferenceable(8) [[P]])
4549
; COUNTER2-NEXT: call void @func_many(i32* align 8 [[P1]])
50+
; COUNTER2-NEXT: call void @func_many(i32* noundef align 8 [[P1]])
4651
; COUNTER2-NEXT: call void @func_argattr(i32* [[P2]], i32* [[P3]])
52+
; COUNTER2-NEXT: call void @func_argattr2(i32* [[P2]], i32* [[P3]])
4753
; COUNTER2-NEXT: call void @func(i32* nonnull [[P1]], i32* nonnull [[P]])
54+
; COUNTER2-NEXT: call void @func(i32* noundef nonnull [[P1]], i32* noundef nonnull [[P]])
4855
; COUNTER2-NEXT: ret void
4956
;
5057
; COUNTER3-LABEL: define {{[^@]+}}@test
51-
; COUNTER3-SAME: (i32* [[P:%.*]], i32* [[P1:%.*]], i32* [[P2:%.*]], i32* [[P3:%.*]])
58+
; COUNTER3-SAME: (i32* [[P:%.*]], i32* [[P1:%.*]], i32* [[P2:%.*]], i32* [[P3:%.*]]) {
5259
; COUNTER3-NEXT: call void @func(i32* nonnull dereferenceable(16) [[P]], i32* null)
5360
; COUNTER3-NEXT: call void @func(i32* dereferenceable(12) [[P1]], i32* nonnull [[P]])
5461
; COUNTER3-NEXT: call void @llvm.assume(i1 true) [ "dereferenceable"(i32* [[P1]], i64 12), "cold"() ]
55-
; COUNTER3-NEXT: call void @func_cold(i32* dereferenceable(12) [[P1]]) #5
62+
; COUNTER3-NEXT: call void @func_cold(i32* dereferenceable(12) [[P1]]) [[ATTR5:#.*]]
5663
; COUNTER3-NEXT: call void @llvm.assume(i1 true) [ "cold"() ]
5764
; COUNTER3-NEXT: call void @func_cold(i32* dereferenceable(12) [[P1]])
5865
; COUNTER3-NEXT: call void @func(i32* [[P1]], i32* [[P]])
5966
; COUNTER3-NEXT: call void @func_strbool(i32* [[P1]])
6067
; COUNTER3-NEXT: call void @llvm.assume(i1 true) [ "dereferenceable"(i32* [[P]], i64 32) ]
6168
; COUNTER3-NEXT: call void @func(i32* dereferenceable(32) [[P]], i32* dereferenceable(8) [[P]])
62-
; COUNTER3-NEXT: call void @llvm.assume(i1 true) [ "align"(i32* [[P1]], i64 8) ]
6369
; COUNTER3-NEXT: call void @func_many(i32* align 8 [[P1]])
64-
; COUNTER3-NEXT: call void @llvm.assume(i1 true) [ "align"(i32* [[P2]], i64 8), "nonnull"(i32* [[P3]]) ]
70+
; COUNTER3-NEXT: call void @llvm.assume(i1 true) [ "noundef"(i32* [[P1]]), "align"(i32* [[P1]], i64 8) ]
71+
; COUNTER3-NEXT: call void @func_many(i32* noundef align 8 [[P1]])
6572
; COUNTER3-NEXT: call void @func_argattr(i32* [[P2]], i32* [[P3]])
66-
; COUNTER3-NEXT: call void @llvm.assume(i1 true) [ "nonnull"(i32* [[P1]]), "nonnull"(i32* [[P]]) ]
73+
; COUNTER3-NEXT: call void @llvm.assume(i1 true) [ "noundef"(i32* [[P2]]), "align"(i32* [[P2]], i64 8), "noundef"(i32* [[P3]]), "nonnull"(i32* [[P3]]) ]
74+
; COUNTER3-NEXT: call void @func_argattr2(i32* [[P2]], i32* [[P3]])
6775
; COUNTER3-NEXT: call void @func(i32* nonnull [[P1]], i32* nonnull [[P]])
76+
; COUNTER3-NEXT: call void @llvm.assume(i1 true) [ "nonnull"(i32* [[P1]]), "noundef"(i32* [[P]]), "nonnull"(i32* [[P]]) ]
77+
; COUNTER3-NEXT: call void @func(i32* noundef nonnull [[P1]], i32* noundef nonnull [[P]])
6878
; COUNTER3-NEXT: ret void
6979
;
7080
call void @func(i32* nonnull dereferenceable(16) %P, i32* null)
@@ -75,7 +85,10 @@ define void @test(i32* %P, i32* %P1, i32* %P2, i32* %P3) {
7585
call void @func_strbool(i32* %P1)
7686
call void @func(i32* dereferenceable(32) %P, i32* dereferenceable(8) %P)
7787
call void @func_many(i32* align 8 %P1)
88+
call void @func_many(i32* align 8 noundef %P1)
7889
call void @func_argattr(i32* %P2, i32* %P3)
90+
call void @func_argattr2(i32* %P2, i32* %P3)
7991
call void @func(i32* nonnull %P1, i32* nonnull %P)
92+
call void @func(i32* nonnull noundef %P1, i32* nonnull noundef %P)
8093
ret void
8194
}

llvm/test/Transforms/Util/assume-builder.ll

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ declare void @func_cold(i32*) cold willreturn nounwind
1818
declare void @func_strbool(i32*) "no-jump-tables"
1919
declare void @func_many(i32*) "no-jump-tables" nounwind "less-precise-fpmad" willreturn norecurse
2020
declare void @func_argattr(i32* align 8, i32* nonnull) nounwind
21+
declare void @func_argattr2(i32* noundef align 8, i32* noundef nonnull) nounwind
2122
declare void @may_throw()
2223

2324
define void @test(i32* %P, i32* %P1, i32* %P2, i32* %P3) {
@@ -35,12 +36,15 @@ define void @test(i32* %P, i32* %P1, i32* %P2, i32* %P3) {
3536
; BASIC-NEXT: call void @func_strbool(i32* [[P1]])
3637
; BASIC-NEXT: call void @llvm.assume(i1 true) [ "dereferenceable"(i32* [[P]], i64 32) ]
3738
; BASIC-NEXT: call void @func(i32* dereferenceable(32) [[P]], i32* dereferenceable(8) [[P]])
38-
; BASIC-NEXT: call void @llvm.assume(i1 true) [ "align"(i32* [[P1]], i64 8) ]
3939
; BASIC-NEXT: call void @func_many(i32* align 8 [[P1]])
40-
; BASIC-NEXT: call void @llvm.assume(i1 true) [ "align"(i32* [[P2]], i64 8), "nonnull"(i32* [[P3]]) ]
40+
; BASIC-NEXT: call void @llvm.assume(i1 true) [ "noundef"(i32* [[P1]]), "align"(i32* [[P1]], i64 8) ]
41+
; BASIC-NEXT: call void @func_many(i32* noundef align 8 [[P1]])
4142
; BASIC-NEXT: call void @func_argattr(i32* [[P2]], i32* [[P3]])
42-
; BASIC-NEXT: call void @llvm.assume(i1 true) [ "nonnull"(i32* [[P1]]) ]
43+
; BASIC-NEXT: call void @llvm.assume(i1 true) [ "noundef"(i32* [[P2]]), "align"(i32* [[P2]], i64 8), "noundef"(i32* [[P3]]), "nonnull"(i32* [[P3]]) ]
44+
; BASIC-NEXT: call void @func_argattr2(i32* [[P2]], i32* [[P3]])
4345
; BASIC-NEXT: call void @func(i32* nonnull [[P1]], i32* nonnull [[P]])
46+
; BASIC-NEXT: call void @llvm.assume(i1 true) [ "nonnull"(i32* [[P1]]), "noundef"(i32* [[P]]) ]
47+
; BASIC-NEXT: call void @func(i32* noundef nonnull [[P1]], i32* noundef nonnull [[P]])
4448
; BASIC-NEXT: ret void
4549
;
4650
; ALL-LABEL: define {{[^@]+}}@test
@@ -57,12 +61,17 @@ define void @test(i32* %P, i32* %P1, i32* %P2, i32* %P3) {
5761
; ALL-NEXT: call void @func_strbool(i32* [[P1]])
5862
; ALL-NEXT: call void @llvm.assume(i1 true) [ "dereferenceable"(i32* [[P]], i64 32) ]
5963
; ALL-NEXT: call void @func(i32* dereferenceable(32) [[P]], i32* dereferenceable(8) [[P]])
60-
; ALL-NEXT: call void @llvm.assume(i1 true) [ "align"(i32* [[P1]], i64 8), "norecurse"(), "nounwind"(), "willreturn"() ]
64+
; ALL-NEXT: call void @llvm.assume(i1 true) [ "norecurse"(), "nounwind"(), "willreturn"() ]
6165
; ALL-NEXT: call void @func_many(i32* align 8 [[P1]])
62-
; ALL-NEXT: call void @llvm.assume(i1 true) [ "align"(i32* [[P2]], i64 8), "nonnull"(i32* [[P3]]), "nounwind"() ]
66+
; ALL-NEXT: call void @llvm.assume(i1 true) [ "noundef"(i32* [[P1]]), "align"(i32* [[P1]], i64 8), "norecurse"(), "nounwind"(), "willreturn"() ]
67+
; ALL-NEXT: call void @func_many(i32* noundef align 8 [[P1]])
68+
; ALL-NEXT: call void @llvm.assume(i1 true) [ "nounwind"() ]
6369
; ALL-NEXT: call void @func_argattr(i32* [[P2]], i32* [[P3]])
64-
; ALL-NEXT: call void @llvm.assume(i1 true) [ "nonnull"(i32* [[P1]]) ]
70+
; ALL-NEXT: call void @llvm.assume(i1 true) [ "noundef"(i32* [[P2]]), "align"(i32* [[P2]], i64 8), "noundef"(i32* [[P3]]), "nonnull"(i32* [[P3]]), "nounwind"() ]
71+
; ALL-NEXT: call void @func_argattr2(i32* [[P2]], i32* [[P3]])
6572
; ALL-NEXT: call void @func(i32* nonnull [[P1]], i32* nonnull [[P]])
73+
; ALL-NEXT: call void @llvm.assume(i1 true) [ "nonnull"(i32* [[P1]]), "noundef"(i32* [[P]]) ]
74+
; ALL-NEXT: call void @func(i32* noundef nonnull [[P1]], i32* noundef nonnull [[P]])
6675
; ALL-NEXT: ret void
6776
;
6877
; WITH-AC-LABEL: define {{[^@]+}}@test
@@ -79,12 +88,15 @@ define void @test(i32* %P, i32* %P1, i32* %P2, i32* %P3) {
7988
; WITH-AC-NEXT: call void @func_strbool(i32* [[P1]])
8089
; WITH-AC-NEXT: call void @llvm.assume(i1 true) [ "dereferenceable"(i32* [[P]], i64 32) ]
8190
; WITH-AC-NEXT: call void @func(i32* dereferenceable(32) [[P]], i32* dereferenceable(8) [[P]])
82-
; WITH-AC-NEXT: call void @llvm.assume(i1 true) [ "align"(i32* [[P1]], i64 8) ]
8391
; WITH-AC-NEXT: call void @func_many(i32* align 8 [[P1]])
84-
; WITH-AC-NEXT: call void @llvm.assume(i1 true) [ "align"(i32* [[P2]], i64 8), "nonnull"(i32* [[P3]]) ]
92+
; WITH-AC-NEXT: call void @llvm.assume(i1 true) [ "noundef"(i32* [[P1]]), "align"(i32* [[P1]], i64 8) ]
93+
; WITH-AC-NEXT: call void @func_many(i32* noundef align 8 [[P1]])
8594
; WITH-AC-NEXT: call void @func_argattr(i32* [[P2]], i32* [[P3]])
86-
; WITH-AC-NEXT: call void @llvm.assume(i1 true) [ "nonnull"(i32* [[P1]]) ]
95+
; WITH-AC-NEXT: call void @llvm.assume(i1 true) [ "noundef"(i32* [[P2]]), "align"(i32* [[P2]], i64 8), "noundef"(i32* [[P3]]), "nonnull"(i32* [[P3]]) ]
96+
; WITH-AC-NEXT: call void @func_argattr2(i32* [[P2]], i32* [[P3]])
8797
; WITH-AC-NEXT: call void @func(i32* nonnull [[P1]], i32* nonnull [[P]])
98+
; WITH-AC-NEXT: call void @llvm.assume(i1 true) [ "nonnull"(i32* [[P1]]), "noundef"(i32* [[P]]) ]
99+
; WITH-AC-NEXT: call void @func(i32* noundef nonnull [[P1]], i32* noundef nonnull [[P]])
88100
; WITH-AC-NEXT: ret void
89101
;
90102
; CROSS-BLOCK-LABEL: define {{[^@]+}}@test
@@ -101,12 +113,15 @@ define void @test(i32* %P, i32* %P1, i32* %P2, i32* %P3) {
101113
; CROSS-BLOCK-NEXT: call void @func_strbool(i32* [[P1]])
102114
; CROSS-BLOCK-NEXT: call void @llvm.assume(i1 true) [ "dereferenceable"(i32* [[P]], i64 32) ]
103115
; CROSS-BLOCK-NEXT: call void @func(i32* dereferenceable(32) [[P]], i32* dereferenceable(8) [[P]])
104-
; CROSS-BLOCK-NEXT: call void @llvm.assume(i1 true) [ "align"(i32* [[P1]], i64 8) ]
105116
; CROSS-BLOCK-NEXT: call void @func_many(i32* align 8 [[P1]])
106-
; CROSS-BLOCK-NEXT: call void @llvm.assume(i1 true) [ "align"(i32* [[P2]], i64 8), "nonnull"(i32* [[P3]]) ]
117+
; CROSS-BLOCK-NEXT: call void @llvm.assume(i1 true) [ "noundef"(i32* [[P1]]), "align"(i32* [[P1]], i64 8) ]
118+
; CROSS-BLOCK-NEXT: call void @func_many(i32* noundef align 8 [[P1]])
107119
; CROSS-BLOCK-NEXT: call void @func_argattr(i32* [[P2]], i32* [[P3]])
108-
; CROSS-BLOCK-NEXT: call void @llvm.assume(i1 true) [ "nonnull"(i32* [[P1]]) ]
120+
; CROSS-BLOCK-NEXT: call void @llvm.assume(i1 true) [ "noundef"(i32* [[P2]]), "align"(i32* [[P2]], i64 8), "noundef"(i32* [[P3]]), "nonnull"(i32* [[P3]]) ]
121+
; CROSS-BLOCK-NEXT: call void @func_argattr2(i32* [[P2]], i32* [[P3]])
109122
; CROSS-BLOCK-NEXT: call void @func(i32* nonnull [[P1]], i32* nonnull [[P]])
123+
; CROSS-BLOCK-NEXT: call void @llvm.assume(i1 true) [ "nonnull"(i32* [[P1]]), "noundef"(i32* [[P]]) ]
124+
; CROSS-BLOCK-NEXT: call void @func(i32* noundef nonnull [[P1]], i32* noundef nonnull [[P]])
110125
; CROSS-BLOCK-NEXT: ret void
111126
;
112127
; FULL-SIMPLIFY-LABEL: define {{[^@]+}}@test
@@ -121,11 +136,15 @@ define void @test(i32* %P, i32* %P1, i32* %P2, i32* %P3) {
121136
; FULL-SIMPLIFY-NEXT: call void @func_strbool(i32* [[P1]])
122137
; FULL-SIMPLIFY-NEXT: call void @llvm.assume(i1 true) [ "dereferenceable"(i32* [[P]], i64 32) ]
123138
; FULL-SIMPLIFY-NEXT: call void @func(i32* dereferenceable(32) [[P]], i32* dereferenceable(8) [[P]])
124-
; FULL-SIMPLIFY-NEXT: call void @llvm.assume(i1 true) [ "align"(i32* [[P1]], i64 8), "align"(i32* [[P2]], i64 8), "nonnull"(i32* [[P3]]) ]
125139
; FULL-SIMPLIFY-NEXT: call void @func_many(i32* align 8 [[P1]])
140+
; FULL-SIMPLIFY-NEXT: call void @llvm.assume(i1 true) [ "noundef"(i32* [[P1]]), "align"(i32* [[P1]], i64 8) ]
141+
; FULL-SIMPLIFY-NEXT: call void @func_many(i32* noundef align 8 [[P1]])
126142
; FULL-SIMPLIFY-NEXT: call void @func_argattr(i32* [[P2]], i32* [[P3]])
127-
; FULL-SIMPLIFY-NEXT: call void @llvm.assume(i1 true) [ "nonnull"(i32* [[P1]]) ]
143+
; FULL-SIMPLIFY-NEXT: call void @llvm.assume(i1 true) [ "noundef"(i32* [[P2]]), "align"(i32* [[P2]], i64 8), "noundef"(i32* [[P3]]), "nonnull"(i32* [[P3]]) ]
144+
; FULL-SIMPLIFY-NEXT: call void @func_argattr2(i32* [[P2]], i32* [[P3]])
128145
; FULL-SIMPLIFY-NEXT: call void @func(i32* nonnull [[P1]], i32* nonnull [[P]])
146+
; FULL-SIMPLIFY-NEXT: call void @llvm.assume(i1 true) [ "nonnull"(i32* [[P1]]), "noundef"(i32* [[P]]) ]
147+
; FULL-SIMPLIFY-NEXT: call void @func(i32* noundef nonnull [[P1]], i32* noundef nonnull [[P]])
129148
; FULL-SIMPLIFY-NEXT: ret void
130149
;
131150
call void @func(i32* nonnull dereferenceable(16) %P, i32* null)
@@ -136,8 +155,11 @@ define void @test(i32* %P, i32* %P1, i32* %P2, i32* %P3) {
136155
call void @func_strbool(i32* %P1)
137156
call void @func(i32* dereferenceable(32) %P, i32* dereferenceable(8) %P)
138157
call void @func_many(i32* align 8 %P1)
158+
call void @func_many(i32* align 8 noundef %P1)
139159
call void @func_argattr(i32* %P2, i32* %P3)
160+
call void @func_argattr2(i32* %P2, i32* %P3)
140161
call void @func(i32* nonnull %P1, i32* nonnull %P)
162+
call void @func(i32* nonnull noundef %P1, i32* nonnull noundef %P)
141163
ret void
142164
}
143165

0 commit comments

Comments
 (0)