blob: 4d663bc56cedcfb3e909b6f44d408795f337059c [file] [log] [blame]
Hal Finkelb31d3d22011-10-17 04:03:55 +00001; RUN: llc < %s -march=ppc32 -o %t
2; RUN: grep sync %t
3; RUN: not grep msync %t
4; RUN: llc < %s -march=ppc32 -mcpu=440 | grep msync
5
6define i32 @has_a_fence(i32 %a, i32 %b) nounwind {
7entry:
8 fence acquire
9 %cond = icmp eq i32 %a, %b
10 br i1 %cond, label %IfEqual, label %IfUnequal
11
12IfEqual:
13 fence release
14 br label %end
15
16IfUnequal:
17 fence release
18 ret i32 0
19
20end:
21 ret i32 1
22}
23