• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc %s -mtriple=x86_64-windows-msvc -o /dev/null 2>&1
2; REQUIRES: asserts
3; XFAIL: *
4
5declare token @llvm.call.preallocated.setup(i32)
6declare i8* @llvm.call.preallocated.arg(token, i32)
7
8%Foo = type { i32, i32 }
9
10declare x86_thiscallcc void @f(i32, %Foo* preallocated(%Foo))
11
12define void @g() {
13  %t = call token @llvm.call.preallocated.setup(i32 1)
14  %a = call i8* @llvm.call.preallocated.arg(token %t, i32 0) preallocated(%Foo)
15  %b = bitcast i8* %a to %Foo*
16  call void @f(i32 0, %Foo* preallocated(%Foo) %b) ["preallocated"(token %t)]
17  ret void
18}
19