1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s -mtriple=x86_64-- -mattr=-sse -O0 | FileCheck %s 3; PR9675 4 5define i32 @t() { 6; CHECK-LABEL: t: 7; CHECK: # %bb.0: 8; CHECK-NEXT: movl $1, -{{[0-9]+}}(%rsp) 9; CHECK-NEXT: mfence 10; CHECK-NEXT: lock decl -{{[0-9]+}}(%rsp) 11; CHECK-NEXT: mfence 12; CHECK-NEXT: xorl %eax, %eax 13; CHECK-NEXT: retq 14 %i = alloca i32, align 4 15 store i32 1, i32* %i, align 4 16 fence seq_cst 17 %t0 = atomicrmw sub i32* %i, i32 1 monotonic 18 fence seq_cst 19 ret i32 0 20} 21