15 lines · plain
1; RUN: llvm-as < %s | llvm-bcanalyzer -dump | FileCheck %s2; Make sure the names of atomics are known3 4; CHECK: INST_CMPXCHG5; CHECK: INST_STOREATOMIC6; CHECK: INST_LOADATOMIC7; CHECK: INST_FENCE8define void @atomics(i32* %ptr) {9 store atomic i32 0, i32* %ptr monotonic, align 410 %load = load atomic i32, i32* %ptr monotonic, align 411 %xchg = cmpxchg i32* %ptr, i32 0, i32 5 acquire monotonic12 fence seq_cst13 ret void14}15