1; RUN: llc -march=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: movsbl 9; CHECK: cmpl 10; CHECK: lock 11; CHECK-NEXT: cmpxchgb 12; CHECK: jne [[LABEL1]] 13 %2 = atomicrmw min i8* @sc8, i8 6 acquire 14; CHECK: [[LABEL3:\.?LBB[0-9]+_[0-9]+]]: 15; CHECK: movsbl 16; CHECK: cmpl 17; CHECK: lock 18; CHECK-NEXT: cmpxchgb 19; CHECK: jne [[LABEL3]] 20 %3 = atomicrmw umax i8* @sc8, i8 7 acquire 21; CHECK: [[LABEL5:\.?LBB[0-9]+_[0-9]+]]: 22; CHECK: movzbl 23; CHECK: cmpl 24; CHECK: lock 25; CHECK-NEXT: cmpxchgb 26; CHECK: jne [[LABEL5]] 27 %4 = atomicrmw umin i8* @sc8, i8 8 acquire 28; CHECK: [[LABEL7:\.?LBB[0-9]+_[0-9]+]]: 29; CHECK: movzbl 30; CHECK: cmpl 31; CHECK: lock 32; CHECK-NEXT: cmpxchgb 33; CHECK: jne [[LABEL7]] 34 ret void 35} 36