mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-27 13:30:05 +00:00
3bca0b9d6e
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142189 91177308-0d34-0410-b5e6-96231b3b80d8
28 lines
472 B
LLVM
28 lines
472 B
LLVM
; RUN: llc < %s -march=ppc32 | FileCheck %s
|
|
; RUN: llc < %s -march=ppc32 -mcpu=440 | FileCheck %s -check-prefix=BE-CHK
|
|
|
|
define i32 @has_a_fence(i32 %a, i32 %b) nounwind {
|
|
entry:
|
|
fence acquire
|
|
%cond = icmp eq i32 %a, %b
|
|
br i1 %cond, label %IfEqual, label %IfUnequal
|
|
|
|
IfEqual:
|
|
fence release
|
|
; CHECK: sync
|
|
; CHECK-NOT: msync
|
|
; BE-CHK: msync
|
|
br label %end
|
|
|
|
IfUnequal:
|
|
fence release
|
|
; CHECK: sync
|
|
; CHECK-NOT: msync
|
|
; BE-CHK: msync
|
|
ret i32 0
|
|
|
|
end:
|
|
ret i32 1
|
|
}
|
|
|