2011-10-17 16:01:41 +00:00
|
|
|
; RUN: llc < %s -march=ppc32 | FileCheck %s
|
2014-10-02 22:34:22 +00:00
|
|
|
; RUN: llc < %s -march=ppc64 -mcpu=a2 | FileCheck %s
|
2011-10-17 16:01:41 +00:00
|
|
|
; RUN: llc < %s -march=ppc32 -mcpu=440 | FileCheck %s -check-prefix=BE-CHK
|
2011-10-17 04:03:55 +00:00
|
|
|
|
|
|
|
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
|
2011-10-17 16:01:41 +00:00
|
|
|
; CHECK: sync
|
|
|
|
; CHECK-NOT: msync
|
|
|
|
; BE-CHK: msync
|
2011-10-17 04:03:55 +00:00
|
|
|
br label %end
|
|
|
|
|
|
|
|
IfUnequal:
|
|
|
|
fence release
|
2011-10-17 16:01:41 +00:00
|
|
|
; CHECK: sync
|
|
|
|
; CHECK-NOT: msync
|
|
|
|
; BE-CHK: msync
|
2011-10-17 04:03:55 +00:00
|
|
|
ret i32 0
|
|
|
|
|
|
|
|
end:
|
|
|
|
ret i32 1
|
|
|
|
}
|
|
|
|
|