summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/pr5145.ll
blob: 4dee5f8d7d2a8b60b124a58439bc3c04c8ec5a32 (plain)
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
29
30
31
; 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: movsbl
; CHECK: cmpl
; CHECK: lock cmpxchgb
; CHECK: jne [[LABEL1]]
  %2 = atomicrmw min  i8* @sc8, i8 6 acquire
; CHECK: [[LABEL3:\.?LBB[0-9]+_[0-9]+]]:
; CHECK: movsbl
; CHECK: cmpl
; CHECK: lock cmpxchgb
; CHECK: jne [[LABEL3]]
  %3 = atomicrmw umax i8* @sc8, i8 7 acquire
; CHECK: [[LABEL5:\.?LBB[0-9]+_[0-9]+]]:
; CHECK: movzbl
; CHECK: cmpl
; CHECK: lock cmpxchgb
; CHECK: jne [[LABEL5]]
  %4 = atomicrmw umin i8* @sc8, i8 8 acquire
; CHECK: [[LABEL7:\.?LBB[0-9]+_[0-9]+]]:
; CHECK: movzbl
; CHECK: cmpl
; CHECK: lock cmpxchgb
; CHECK: jne [[LABEL7]]
  ret void
}