xref: /llvm-project/llvm/test/CodeGen/PowerPC/ppc440-msync.ll (revision e2d2ce9ff1fabe751d3990af4bfa82cbf4998d41)
1; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | FileCheck %s
2; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- -mcpu=a2 | FileCheck %s
3; RUN: llc -verify-machineinstrs < %s -mtriple=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