blob: 5493fbf9e1100b06970089e323528ef99c7daa13 [file] [log] [blame]
Eli Friedman2586b8f2011-05-16 20:27:46 +00001; RUN: llc < %s -mtriple x86_64-apple-darwin11 -O0 | FileCheck %s
2
3%struct.x = type { i64, i64 }
4declare %struct.x @f()
5
6define void @test1(i64*) nounwind ssp {
7 %2 = tail call %struct.x @f() nounwind
8 %3 = extractvalue %struct.x %2, 0
9 %4 = add i64 %3, 10
10 store i64 %4, i64* %0
11 ret void
12; CHECK: test1:
13; CHECK: callq _f
14; CHECK-NEXT: addq $10, %rax
15}
16
17define void @test2(i64*) nounwind ssp {
18 %2 = tail call %struct.x @f() nounwind
19 %3 = extractvalue %struct.x %2, 1
20 %4 = add i64 %3, 10
21 store i64 %4, i64* %0
22 ret void
23; CHECK: test2:
24; CHECK: callq _f
25; CHECK-NEXT: addq $10, %rdx
26}