brintos

brintos / llvm-project-archived public Read only

0
0
Text · 557 B · b553b76 Raw
22 lines · plain
1; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=corei7 | FileCheck %s2; rdar://r75125793 4; PHI defs in the atomic loop should be used by the add / adc5; instructions. They should not be dead.6 7define void @t(ptr nocapture %p) nounwind ssp {8entry:9; CHECK-LABEL: t:10; CHECK: movl ([[REG:%[a-z]+]]), %eax11; CHECK: movl 4([[REG]]), %edx12; CHECK: LBB0_1:13; CHECK: movl %eax, %ebx14; CHECK: addl $1, %ebx15; CHECK: movl %edx, %ecx16; CHECK: adcl $0, %ecx17; CHECK: lock cmpxchg8b ([[REG]])18; CHECK-NEXT: jne19  %0 = atomicrmw add ptr %p, i64 1 seq_cst20  ret void21}22