1# RUN: llc -march=x86-64 -run-pass none -o - %s | FileCheck %s 2 3--- | 4 define i64 @test(i64 %x, i64 %y) #0 { 5 entry: 6 %x0 = call { i64, i64 } asm "foo", "=r,=r,1,0,~{dirflag},~{fpsr},~{flags}"(i64 %x, i64 %y) #0 7 %x1 = extractvalue { i64, i64 } %x0, 0 8 ret i64 %x1 9 } 10 11 define i64 @test2(i64 %x, i64 %y) #0 { 12 entry: 13 %x0 = call { i64, i64 } asm "foo", "=r,=r,1,0,~{dirflag},~{fpsr},~{flags}"(i64 %x, i64 %y) #0 14 %x1 = extractvalue { i64, i64 } %x0, 0 15 ret i64 %x1 16 } 17 18 attributes #0 = { nounwind } 19... 20--- 21name: test 22tracksRegLiveness: true 23liveins: 24 - { reg: '$rdi' } 25 - { reg: '$rsi' } 26body: | 27 bb.0.entry: 28 liveins: $rdi, $rsi 29 30 ; CHECK-LABEL: name: test 31 ; CHECK: INLINEASM &foo, 0, 2818058, def $rsi, 2818058, def dead $rdi, 32 INLINEASM &foo, 0, 2818058, def $rsi, 2818058, def dead $rdi, 2147549193, killed $rdi, 2147483657, killed $rsi, 12, implicit-def dead early-clobber $eflags 33 $rax = MOV64rr killed $rsi 34 RETQ killed $rax 35... 36--- 37name: test2 38tracksRegLiveness: true 39liveins: 40 - { reg: '$rdi' } 41 - { reg: '$rsi' } 42body: | 43 bb.0.entry: 44 liveins: $rdi, $rsi 45 46 ; Verify that the register ties are preserved. 47 ; CHECK-LABEL: name: test2 48 ; CHECK: INLINEASM &foo, 0, 2818058, def $rsi, 2818058, def dead $rdi, 2147549193, killed $rdi(tied-def 5), 2147483657, killed $rsi(tied-def 3), 12, implicit-def dead early-clobber $eflags 49 INLINEASM &foo, 0, 2818058, def $rsi, 2818058, def dead $rdi, 2147549193, killed $rdi(tied-def 5), 2147483657, killed $rsi(tied-def 3), 12, implicit-def dead early-clobber $eflags 50 $rax = MOV64rr killed $rsi 51 RETQ killed $rax 52... 53