2011-10-20 21:10:27 +00:00
|
|
|
; RUN: llc < %s -mtriple=armv7-apple-darwin -verify-machineinstrs | FileCheck %s -check-prefix=ARM
|
|
|
|
; RUN: llc < %s -mtriple=thumbv7-apple-darwin -verify-machineinstrs | FileCheck %s -check-prefix=T2
|
2011-02-20 12:57:14 +00:00
|
|
|
; rdar://8964854
|
|
|
|
|
|
|
|
define i8 @t(i8* %a, i8 %b, i8 %c) nounwind {
|
2013-12-22 00:04:03 +00:00
|
|
|
; ARM-LABEL: t:
|
2011-02-20 12:57:14 +00:00
|
|
|
; ARM: ldrexb
|
|
|
|
; ARM: strexb
|
2015-12-30 11:46:15 +00:00
|
|
|
; ARM: clrex
|
2011-02-20 12:57:14 +00:00
|
|
|
|
2013-12-22 00:04:03 +00:00
|
|
|
; T2-LABEL: t:
|
2011-02-20 12:57:14 +00:00
|
|
|
; T2: strexb
|
2015-12-30 11:46:15 +00:00
|
|
|
; T2: ldrexb
|
|
|
|
; T2: clrex
|
2014-11-24 09:08:18 +00:00
|
|
|
%tmp0 = cmpxchg i8* %a, i8 %b, i8 %c monotonic monotonic
|
|
|
|
%tmp1 = extractvalue { i8, i1 } %tmp0, 0
|
|
|
|
ret i8 %tmp1
|
2011-02-20 12:57:14 +00:00
|
|
|
}
|