mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-02 07:32:52 +00:00
e5e8f7656a
- Turn on atomic6432.ll and add specific test case as well git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164616 91177308-0d34-0410-b5e6-96231b3b80d8
52 lines
1.1 KiB
LLVM
52 lines
1.1 KiB
LLVM
; RUN: llc -march=x86 -mattr=+cmov -mtriple=i386-pc-linux < %s | FileCheck %s
|
|
@sc64 = external global i64
|
|
|
|
define void @atomic_maxmin_i6432() {
|
|
; CHECK: atomic_maxmin_i6432
|
|
%1 = atomicrmw max i64* @sc64, i64 5 acquire
|
|
; CHECK: [[LABEL:.LBB[0-9]+_[0-9]+]]
|
|
; CHECK: cmpl
|
|
; CHECK: setl
|
|
; CHECK: cmpl
|
|
; CHECK: setl
|
|
; CHECK: cmovne
|
|
; CHECK: cmovne
|
|
; CHECK: lock
|
|
; CHECK-NEXT: cmpxchg8b
|
|
; CHECK: jne [[LABEL]]
|
|
%2 = atomicrmw min i64* @sc64, i64 6 acquire
|
|
; CHECK: [[LABEL:.LBB[0-9]+_[0-9]+]]
|
|
; CHECK: cmpl
|
|
; CHECK: setg
|
|
; CHECK: cmpl
|
|
; CHECK: setg
|
|
; CHECK: cmovne
|
|
; CHECK: cmovne
|
|
; CHECK: lock
|
|
; CHECK-NEXT: cmpxchg8b
|
|
; CHECK: jne [[LABEL]]
|
|
%3 = atomicrmw umax i64* @sc64, i64 7 acquire
|
|
; CHECK: [[LABEL:.LBB[0-9]+_[0-9]+]]
|
|
; CHECK: cmpl
|
|
; CHECK: setb
|
|
; CHECK: cmpl
|
|
; CHECK: setb
|
|
; CHECK: cmovne
|
|
; CHECK: cmovne
|
|
; CHECK: lock
|
|
; CHECK-NEXT: cmpxchg8b
|
|
; CHECK: jne [[LABEL]]
|
|
%4 = atomicrmw umin i64* @sc64, i64 8 acquire
|
|
; CHECK: [[LABEL:.LBB[0-9]+_[0-9]+]]
|
|
; CHECK: cmpl
|
|
; CHECK: seta
|
|
; CHECK: cmpl
|
|
; CHECK: seta
|
|
; CHECK: cmovne
|
|
; CHECK: cmovne
|
|
; CHECK: lock
|
|
; CHECK-NEXT: cmpxchg8b
|
|
; CHECK: jne [[LABEL]]
|
|
ret void
|
|
}
|