The AND instruction leaves the V flag unmodified, so it falls victim to the same
[oota-llvm.git] / test / CodeGen / Thumb / barrier.ll
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 -mattr=+v6m       | FileCheck %s -check-prefix=V6M
4
5 declare void @llvm.memory.barrier(i1 , i1 , i1 , i1 , i1)
6
7 define 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
17 define 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 }