• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llc -march=x86-64 -start-after block-placement -stop-after block-placement -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
22hasInlineAsm:    true
23tracksRegLiveness: true
24liveins:
25  - { reg: '%rdi' }
26  - { reg: '%rsi' }
27body: |
28  bb.0.entry:
29    liveins: %rdi, %rsi
30
31  ; CHECK-LABEL: name: test
32  ; CHECK: INLINEASM $foo, 0, 2818058, def %rsi, 2818058, def dead %rdi,
33    INLINEASM $foo, 0, 2818058, def %rsi, 2818058, def dead %rdi, 2147549193, killed %rdi, 2147483657, killed %rsi, 12, implicit-def dead early-clobber %eflags
34    %rax = MOV64rr killed %rsi
35    RETQ killed %rax
36...
37---
38name:            test2
39hasInlineAsm:    true
40tracksRegLiveness: true
41liveins:
42  - { reg: '%rdi' }
43  - { reg: '%rsi' }
44body: |
45  bb.0.entry:
46    liveins: %rdi, %rsi
47
48  ; Verify that the register ties are preserved.
49  ; CHECK-LABEL: name: test2
50  ; 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
51    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
52    %rax = MOV64rr killed %rsi
53    RETQ killed %rax
54...
55