Mercurial > hg > Members > tobaru > cbc > CbC_llvm
view test/CodeGen/X86/2010-01-08-Atomic64Bug.ll @ 33:e4204d083e25
LLVM 3.5
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 12 Dec 2013 14:32:10 +0900 |
parents | 95c75e76d11b |
children | 54457678186b |
line wrap: on
line source
; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=corei7 | 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-LABEL: t: ; CHECK: movl ([[REG:%[a-z]+]]), %eax ; CHECK: movl 4([[REG]]), %edx ; CHECK: LBB0_1: ; CHECK: movl %eax, %ebx ; CHECK: addl {{%[a-z]+}}, %ebx ; CHECK: movl %edx, %ecx ; CHECK: adcl {{%[a-z]+}}, %ecx ; CHECK: lock ; CHECK-NEXT: cmpxchg8b ([[REG]]) ; CHECK-NEXT: jne %0 = atomicrmw add i64* %p, i64 1 seq_cst ret void }