22 lines · plain
1; RUN: llc -mtriple=x86_64-pc-linux %s -o - -regalloc=fast -optimize-regalloc=0 | FileCheck %s2 3; We used to consider the early clobber in the second asm statement as4; defining %0 before it was read. This caused us to omit the5; movq -8(%rsp), %rdx6 7; CHECK: #APP8; CHECK-NEXT: #NO_APP9; CHECK-NEXT: movq %rcx, %rdx10; CHECK-NEXT: #APP11; CHECK-NEXT: #NO_APP12; CHECK-NEXT: movq %rcx, -8(%rsp)13; CHECK-NEXT: movq -8(%rsp), %rax14; CHECK-NEXT: ret15 16define i64 @foo() {17entry:18 %0 = tail call i64 asm "", "={cx}"() nounwind19 %1 = tail call i64 asm "", "=&r,0,r,~{rax}"(i64 %0, i64 %0) nounwind20 ret i64 %121}22