aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/pr11415.ll
blob: 6c32a2206a7eafd6596a0f87b10fee81b1543ae4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
; RUN: llc -mtriple=x86_64-pc-linux %s -o - -regalloc=fast -optimize-regalloc=0 | FileCheck %s

; We used to consider the early clobber in the second asm statement as
; defining %0 before it was read. This caused us to omit the
; movq	-8(%rsp), %rdx

; CHECK: 	#APP
; CHECK-NEXT:	#NO_APP
; CHECK-NEXT:	movq	%rcx, %rax
; CHECK-NEXT:	movq	%rax, -8(%rsp)
; CHECK-NEXT:	movq	-8(%rsp), %rdx
; CHECK-NEXT:	#APP
; CHECK-NEXT:	#NO_APP
; CHECK-NEXT:	movq	%rdx, %rax
; CHECK-NEXT:	movq	%rdx, -8(%rsp)
; CHECK-NEXT:	ret

define i64 @foo() {
entry:
  %0 = tail call i64 asm "", "={cx}"() nounwind
  %1 = tail call i64 asm "", "=&r,0,r,~{rax}"(i64 %0, i64 %0) nounwind
  ret i64 %1
}