summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/fast-isel-extract.ll
blob: 5493fbf9e1100b06970089e323528ef99c7daa13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
; RUN: llc < %s -mtriple x86_64-apple-darwin11 -O0 | FileCheck %s

%struct.x = type { i64, i64 }
declare %struct.x @f()

define void @test1(i64*) nounwind ssp {
  %2 = tail call %struct.x @f() nounwind
  %3 = extractvalue %struct.x %2, 0
  %4 = add i64 %3, 10
  store i64 %4, i64* %0
  ret void
; CHECK: test1:
; CHECK: callq _f
; CHECK-NEXT: addq	$10, %rax
}

define void @test2(i64*) nounwind ssp {
  %2 = tail call %struct.x @f() nounwind
  %3 = extractvalue %struct.x %2, 1
  %4 = add i64 %3, 10
  store i64 %4, i64* %0
  ret void
; CHECK: test2:
; CHECK: callq _f
; CHECK-NEXT: addq	$10, %rdx
}