You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
426 B
15 lines
426 B
4 months ago
|
; RUN: llvm-as < %s | llvm-bcanalyzer -dump | FileCheck %s
|
||
|
; Make sure the names of atomics are known
|
||
|
|
||
|
; CHECK: INST_CMPXCHG
|
||
|
; CHECK: INST_STOREATOMIC
|
||
|
; CHECK: INST_LOADATOMIC
|
||
|
; CHECK: INST_FENCE
|
||
|
define void @atomics(i32* %ptr) {
|
||
|
store atomic i32 0, i32* %ptr monotonic, align 4
|
||
|
%load = load atomic i32, i32* %ptr monotonic, align 4
|
||
|
%xchg = cmpxchg i32* %ptr, i32 0, i32 5 acquire monotonic
|
||
|
fence seq_cst
|
||
|
ret void
|
||
|
}
|