blob: b9cb5d7894c745a0c9b652313733b4eceff5b097 [file] [log] [blame]
Jakob Stoklund Olesen098c7ac2011-06-30 23:42:18 +00001; RUN: llc < %s -O0 | FileCheck %s
2target triple = "x86_64-apple-macosx"
3
4declare x86_fp80 @x1(i32) nounwind
5declare i32 @x2(x86_fp80, x86_fp80) nounwind
6
7; Keep track of the return value.
8; CHECK: test1
9; CHECK: x1
10; Pass arguments on the stack.
11; CHECK-NEXT: movq %rsp, [[RCX:%r..]]
12; Copy constant-pool value.
13; CHECK-NEXT: fldt LCPI
14; CHECK-NEXT: fstpt 16([[RCX]])
15; Copy x1 return value.
16; CHECK-NEXT: fstpt ([[RCX]])
17; CHECK-NEXT: x2
18define i32 @test1() nounwind uwtable ssp {
19entry:
20 %call = call x86_fp80 (...)* bitcast (x86_fp80 (i32)* @x1 to x86_fp80 (...)*)(i32 -1)
21 %call1 = call i32 @x2(x86_fp80 %call, x86_fp80 0xK401EFFFFFFFF00000000)
22 ret i32 %call1
23}
24