Eli Friedman | 2586b8f | 2011-05-16 20:27:46 +0000 | [diff] [blame^] | 1 | ; RUN: llc < %s -mtriple x86_64-apple-darwin11 -O0 | FileCheck %s |
| 2 | |
| 3 | %struct.x = type { i64, i64 } |
| 4 | declare %struct.x @f() |
| 5 | |
| 6 | define 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 | |
| 17 | define 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 | } |