• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -mtriple=thumbv6-apple-darwin  | FileCheck %s -check-prefix=V6
2; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mattr=-db | FileCheck %s -check-prefix=V6
3; RUN: llc < %s -march=thumb -mcpu=cortex-m0   | FileCheck %s -check-prefix=V6M
4
5declare void @llvm.memory.barrier(i1 , i1 , i1 , i1 , i1)
6
7define void @t1() {
8; V6: t1:
9; V6: blx {{_*}}sync_synchronize
10
11; V6M: t1:
12; V6M: dmb st
13  call void @llvm.memory.barrier(i1 false, i1 false, i1 false, i1 true, i1 true)
14  ret void
15}
16
17define void @t2() {
18; V6: t2:
19; V6: blx {{_*}}sync_synchronize
20
21; V6M: t2:
22; V6M: dmb ish
23  call void @llvm.memory.barrier(i1 true, i1 false, i1 false, i1 true, i1 false)
24  ret void
25}
26