1; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=instructions --test FileCheck --test-arg --check-prefixes=CHECK,INTERESTING --test-arg %s --test-arg --input-file %s -o %t 2; RUN: FileCheck -check-prefixes=CHECK,RESULT %s < %t 3 4%Foo = type { i32, i32 } 5 6declare token @llvm.call.preallocated.setup(i32) 7declare ptr @llvm.call.preallocated.arg(token, i32) 8declare void @init(ptr) 9declare void @foo_p(ptr preallocated(%Foo)) 10 11; CHECK-LABEL: define void @preallocated_with_init() { 12; INTERESTING: call void @foo_p 13 14; RESULT: %t = call token @llvm.call.preallocated.setup(i32 1) 15; RESULT-NEXT: call void @foo_p(ptr preallocated(%Foo) null) [ "preallocated"(token %t) ] 16; RESULT-NEXT: ret void 17define void @preallocated_with_init() { 18 %t = call token @llvm.call.preallocated.setup(i32 1) 19 %a = call ptr @llvm.call.preallocated.arg(token %t, i32 0) preallocated(%Foo) 20 call void @init(ptr %a) 21 call void @foo_p(ptr preallocated(%Foo) %a) ["preallocated"(token %t)] 22 ret void 23} 24