2010-08-11 17:25:51 +00:00
|
|
|
; RUN: llc < %s -mtriple=thumbv6-apple-darwin | FileCheck %s -check-prefix=V6
|
|
|
|
; RUN: llc < %s -march=thumb -mattr=+v6m | FileCheck %s -check-prefix=V6M
|
2010-08-11 06:22:01 +00:00
|
|
|
|
|
|
|
declare void @llvm.memory.barrier( i1 , i1 , i1 , i1 , i1 )
|
|
|
|
|
|
|
|
define void @t1() {
|
2010-08-11 06:30:38 +00:00
|
|
|
; V6: t1:
|
2010-08-11 17:25:51 +00:00
|
|
|
; V6: blx {{_*}}sync_synchronize
|
2010-08-11 06:30:38 +00:00
|
|
|
|
2010-08-11 06:51:54 +00:00
|
|
|
; V6M: t1:
|
|
|
|
; V6M: dsb
|
2010-08-11 06:22:01 +00:00
|
|
|
call void @llvm.memory.barrier( i1 false, i1 false, i1 false, i1 true, i1 true )
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @t2() {
|
2010-08-11 06:30:38 +00:00
|
|
|
; V6: t2:
|
2010-08-11 17:25:51 +00:00
|
|
|
; V6: blx {{_*}}sync_synchronize
|
2010-08-11 06:30:38 +00:00
|
|
|
|
2010-08-11 06:51:54 +00:00
|
|
|
; V6M: t2:
|
|
|
|
; V6M: dmb
|
2010-08-11 06:22:01 +00:00
|
|
|
call void @llvm.memory.barrier( i1 false, i1 false, i1 false, i1 true, i1 false )
|
|
|
|
ret void
|
|
|
|
}
|