Hal Finkel | b31d3d2 | 2011-10-17 04:03:55 +0000 | [diff] [blame^] | 1 | ; 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 | |||||
6 | define i32 @has_a_fence(i32 %a, i32 %b) nounwind { | ||||
7 | entry: | ||||
8 | fence acquire | ||||
9 | %cond = icmp eq i32 %a, %b | ||||
10 | br i1 %cond, label %IfEqual, label %IfUnequal | ||||
11 | |||||
12 | IfEqual: | ||||
13 | fence release | ||||
14 | br label %end | ||||
15 | |||||
16 | IfUnequal: | ||||
17 | fence release | ||||
18 | ret i32 0 | ||||
19 | |||||
20 | end: | ||||
21 | ret i32 1 | ||||
22 | } | ||||
23 |