1 ; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=corei7 | FileCheck %s
4 ; PHI defs in the atomic loop should be used by the add / adc
5 ; instructions. They should not be dead.
7 define void @t(ptr nocapture %p) nounwind ssp {
10 ; CHECK: movl ([[REG:%[a-z]+]]), %eax
11 ; CHECK: movl 4([[REG]]), %edx
13 ; CHECK: movl %eax, %ebx
14 ; CHECK: addl $1, %ebx
15 ; CHECK: movl %edx, %ecx
16 ; CHECK: adcl $0, %ecx
17 ; CHECK: lock cmpxchg8b ([[REG]])
19 %0 = atomicrmw add ptr %p, i64 1 seq_cst