mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-22 12:33:33 +02:00
ba49bdcb27
This commit serializes the machine instruction's register operand ties. The ties are printed out only when the instructon has register ties that are different from the ties that are specified in the instruction's description. llvm-svn: 245482
55 lines
1.7 KiB
YAML
55 lines
1.7 KiB
YAML
# RUN: llc -march=x86-64 -start-after block-placement -stop-after block-placement -o /dev/null %s | FileCheck %s
|
|
|
|
--- |
|
|
define i64 @test(i64 %x, i64 %y) #0 {
|
|
entry:
|
|
%x0 = call { i64, i64 } asm "foo", "=r,=r,1,0,~{dirflag},~{fpsr},~{flags}"(i64 %x, i64 %y) #0
|
|
%x1 = extractvalue { i64, i64 } %x0, 0
|
|
ret i64 %x1
|
|
}
|
|
|
|
define i64 @test2(i64 %x, i64 %y) #0 {
|
|
entry:
|
|
%x0 = call { i64, i64 } asm "foo", "=r,=r,1,0,~{dirflag},~{fpsr},~{flags}"(i64 %x, i64 %y) #0
|
|
%x1 = extractvalue { i64, i64 } %x0, 0
|
|
ret i64 %x1
|
|
}
|
|
|
|
attributes #0 = { nounwind }
|
|
...
|
|
---
|
|
name: test
|
|
hasInlineAsm: true
|
|
tracksRegLiveness: true
|
|
liveins:
|
|
- { reg: '%rdi' }
|
|
- { reg: '%rsi' }
|
|
body: |
|
|
bb.0.entry:
|
|
liveins: %rdi, %rsi
|
|
|
|
; CHECK-LABEL: name: test
|
|
; CHECK: INLINEASM $foo, 0, 2818058, def %rsi, 2818058, def dead %rdi,
|
|
INLINEASM $foo, 0, 2818058, def %rsi, 2818058, def dead %rdi, 2147549193, killed %rdi, 2147483657, killed %rsi, 12, implicit-def dead early-clobber %eflags
|
|
%rax = MOV64rr killed %rsi
|
|
RETQ killed %rax
|
|
...
|
|
---
|
|
name: test2
|
|
hasInlineAsm: true
|
|
tracksRegLiveness: true
|
|
liveins:
|
|
- { reg: '%rdi' }
|
|
- { reg: '%rsi' }
|
|
body: |
|
|
bb.0.entry:
|
|
liveins: %rdi, %rsi
|
|
|
|
; Verify that the register ties are preserved.
|
|
; CHECK-LABEL: name: test2
|
|
; 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
|
|
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
|
|
%rax = MOV64rr killed %rsi
|
|
RETQ killed %rax
|
|
...
|