24 lines · plain
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 %t2; RUN: FileCheck -check-prefixes=CHECK,RESULT %s < %t3 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_p13 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 void17define 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 void23}24