1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -O0 -fast-isel -verify-machineinstrs -mtriple=x86_64 < %s | FileCheck %s
4 declare { ptr, i64 } @get()
6 declare void @use(ptr, i64)
8 define void @test(ptr %p) nounwind {
11 ; CHECK-NEXT: pushq %rax
12 ; CHECK-NEXT: movq %rdi, (%rsp) # 8-byte Spill
13 ; CHECK-NEXT: callq get@PLT
14 ; CHECK-NEXT: movq (%rsp), %rdi # 8-byte Reload
15 ; CHECK-NEXT: movq %rdx, %rsi
16 ; CHECK-NEXT: movq %rsi, (%rdi)
17 ; CHECK-NEXT: # implicit-def: $rdi
18 ; CHECK-NEXT: callq use@PLT
19 ; CHECK-NEXT: popq %rax
21 %struct = call { ptr, i64 } @get()
22 %struct.1 = extractvalue { ptr, i64 } %struct, 1
23 store i64 %struct.1, ptr %p, align 8
24 %struct.2 = extractvalue { ptr, i64 } %struct, 1
25 call void @use(ptr undef, i64 %struct.2)