File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
llvm/test/Transforms/SCCP Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -247,6 +247,36 @@ define ptr @ret_maybe_null_pointer(ptr %p) {
247247 ret ptr %p
248248}
249249
250+ define internal void @ip_nonnull_arg_callee (ptr %p ) {
251+ ; CHECK-LABEL: define internal void @ip_nonnull_arg_callee(
252+ ; CHECK-SAME: ptr [[P:%.*]]) {
253+ ; CHECK-NEXT: ret void
254+ ;
255+ ret void
256+ }
257+
258+ define internal void @ip_not_nonnull_arg_callee (ptr %p ) {
259+ ; CHECK-LABEL: define internal void @ip_not_nonnull_arg_callee(
260+ ; CHECK-SAME: ptr [[P:%.*]]) {
261+ ; CHECK-NEXT: ret void
262+ ;
263+ ret void
264+ }
265+
266+ define void @ip_nonnull_arg_caller (ptr nonnull %p ) {
267+ ; CHECK-LABEL: define void @ip_nonnull_arg_caller(
268+ ; CHECK-SAME: ptr nonnull [[P:%.*]]) {
269+ ; CHECK-NEXT: call void @ip_nonnull_arg_callee(ptr [[P]])
270+ ; CHECK-NEXT: call void @ip_not_nonnull_arg_callee(ptr [[P]])
271+ ; CHECK-NEXT: call void @ip_not_nonnull_arg_callee(ptr null)
272+ ; CHECK-NEXT: ret void
273+ ;
274+ call void @ip_nonnull_arg_callee (ptr %p )
275+ call void @ip_not_nonnull_arg_callee (ptr %p )
276+ call void @ip_not_nonnull_arg_callee (ptr null )
277+ ret void
278+ }
279+
250280;.
251281; SCCP: [[META0]] = !{}
252282;.
You can’t perform that action at this time.
0 commit comments