• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -mtriple=x86_64-- < %s | FileCheck %s
2@sc8 = external global i8
3
4define void @atomic_maxmin_i8() {
5; CHECK: atomic_maxmin_i8
6  %1 = atomicrmw max  i8* @sc8, i8 5 acquire
7; CHECK: [[LABEL1:\.?LBB[0-9]+_[0-9]+]]:
8; CHECK: cmpb
9; CHECK: jg
10; CHECK: lock cmpxchgb
11; CHECK: jne [[LABEL1]]
12  %2 = atomicrmw min  i8* @sc8, i8 6 acquire
13; CHECK: [[LABEL3:\.?LBB[0-9]+_[0-9]+]]:
14; CHECK: cmpb
15; CHECK: jl
16; CHECK: lock cmpxchgb
17; CHECK: jne [[LABEL3]]
18  %3 = atomicrmw umax i8* @sc8, i8 7 acquire
19; CHECK: [[LABEL5:\.?LBB[0-9]+_[0-9]+]]:
20; CHECK: cmpb
21; CHECK: ja
22; CHECK: lock cmpxchgb
23; CHECK: jne [[LABEL5]]
24  %4 = atomicrmw umin i8* @sc8, i8 8 acquire
25; CHECK: [[LABEL7:\.?LBB[0-9]+_[0-9]+]]:
26; CHECK: cmpb
27; CHECK: jb
28; CHECK: lock cmpxchgb
29; CHECK: jne [[LABEL7]]
30  ret void
31}
32