mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-31 07:52:55 +01:00
8c966675e5
.LBB0_1: # Linux LBB0_1: # Darwin llvm-svn: 164362
36 lines
849 B
LLVM
36 lines
849 B
LLVM
; RUN: llc -march=x86-64 < %s | FileCheck %s
|
|
@sc8 = external global i8
|
|
|
|
define void @atomic_maxmin_i8() {
|
|
; CHECK: atomic_maxmin_i8
|
|
%1 = atomicrmw max i8* @sc8, i8 5 acquire
|
|
; CHECK: [[LABEL1:\.?LBB[0-9]+_[0-9]+]]:
|
|
; CHECK: cmpb
|
|
; CHECK: cmovl
|
|
; CHECK: lock
|
|
; CHECK-NEXT: cmpxchgb
|
|
; CHECK: jne [[LABEL1]]
|
|
%2 = atomicrmw min i8* @sc8, i8 6 acquire
|
|
; CHECK: [[LABEL3:\.?LBB[0-9]+_[0-9]+]]:
|
|
; CHECK: cmpb
|
|
; CHECK: cmovg
|
|
; CHECK: lock
|
|
; CHECK-NEXT: cmpxchgb
|
|
; CHECK: jne [[LABEL3]]
|
|
%3 = atomicrmw umax i8* @sc8, i8 7 acquire
|
|
; CHECK: [[LABEL5:\.?LBB[0-9]+_[0-9]+]]:
|
|
; CHECK: cmpb
|
|
; CHECK: cmovb
|
|
; CHECK: lock
|
|
; CHECK-NEXT: cmpxchgb
|
|
; CHECK: jne [[LABEL5]]
|
|
%4 = atomicrmw umin i8* @sc8, i8 8 acquire
|
|
; CHECK: [[LABEL7:\.?LBB[0-9]+_[0-9]+]]:
|
|
; CHECK: cmpb
|
|
; CHECK: cmova
|
|
; CHECK: lock
|
|
; CHECK-NEXT: cmpxchgb
|
|
; CHECK: jne [[LABEL7]]
|
|
ret void
|
|
}
|