2010-01-09 00:41:50 +01:00
|
|
|
; RUN: llc < %s -mtriple=i386-apple-darwin | FileCheck %s
|
|
|
|
; rdar://r7512579
|
|
|
|
|
|
|
|
; PHI defs in the atomic loop should be used by the add / adc
|
|
|
|
; instructions. They should not be dead.
|
|
|
|
|
|
|
|
define void @t(i64* nocapture %p) nounwind ssp {
|
|
|
|
entry:
|
|
|
|
; CHECK: t:
|
|
|
|
; CHECK: movl $1
|
|
|
|
; CHECK: movl (%ebp), %eax
|
|
|
|
; CHECK: movl 4(%ebp), %edx
|
2010-04-17 18:29:15 +02:00
|
|
|
; CHECK: LBB0_1:
|
2010-01-09 00:41:50 +01:00
|
|
|
; CHECK-NOT: movl $1
|
|
|
|
; CHECK-NOT: movl $0
|
|
|
|
; CHECK: addl
|
|
|
|
; CHECK: adcl
|
|
|
|
; CHECK: lock
|
|
|
|
; CHECK: cmpxchg8b
|
|
|
|
; CHECK: jne
|
2011-09-27 01:15:09 +02:00
|
|
|
%0 = atomicrmw add i64* %p, i64 1 seq_cst
|
2010-01-09 00:41:50 +01:00
|
|
|
ret void
|
|
|
|
}
|