; RUN: llc %s -o - -regalloc=fast | 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
}

; RUN: llc -mtriple=x86_64-pc-linux %s -o - -regalloc=fast | 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
}

Add triple to the test.
Add triple to the test.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@145057 91177308-0d34-0410-b5e6-96231b3b80d8
