• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -mtriple=i386-apple-darwin | FileCheck %s
2; rdar://r7512579
3
4; PHI defs in the atomic loop should be used by the add / adc
5; instructions. They should not be dead.
6
7define void @t(i64* nocapture %p) nounwind ssp {
8entry:
9; CHECK: t:
10; CHECK: movl $1
11; CHECK: movl (%ebp), %eax
12; CHECK: movl 4(%ebp), %edx
13; CHECK: LBB0_1:
14; CHECK-NOT: movl $1
15; CHECK-NOT: movl $0
16; CHECK: addl
17; CHECK: adcl
18; CHECK: lock
19; CHECK: cmpxchg8b
20; CHECK: jne
21  %0 = atomicrmw add i64* %p, i64 1 seq_cst
22  ret void
23}
24