reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- -mcpu=a2 | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -mtriple=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
}