1; RUN: llc < %s -march=ppc32 | FileCheck %s
2; RUN: llc < %s -march=ppc64 -mcpu=a2 | FileCheck %s
3; RUN: llc < %s -march=ppc32 -mcpu=440 | FileCheck %s -check-prefix=BE-CHK
4
5define i32 @has_a_fence(i32 %a, i32 %b) nounwind {
6entry:
7  fence acquire
8  %cond = icmp eq i32 %a, %b
9  br i1 %cond, label %IfEqual, label %IfUnequal
10
11IfEqual:
12  fence release
13; CHECK: sync
14; CHECK-NOT: msync
15; BE-CHK: msync
16  br label %end
17
18IfUnequal:
19  fence release
20; CHECK: sync
21; CHECK-NOT: msync
22; BE-CHK: msync
23  ret i32 0
24
25end:
26  ret i32 1
27}
28
29