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