xref: /llvm-project/lld/test/wasm/lto/atomics.ll (revision a35ebcf255046bc78ea86b3c524e0836425a1156)
1; RUN: llvm-as %s -o %t.o
2; RUN: wasm-ld %t.o -o %t.wasm --lto-O0
3
4; Atomic operations will not fail to compile if atomics are not
5; enabled because LLVM atomics will be lowered to regular ops.
6
7target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
8target triple = "wasm32-unknown-unknown-wasm"
9
10@foo = hidden global i32 1
11
12define void @_start() {
13  %1 = load atomic i32, ptr @foo unordered, align 4
14  ret void
15}
16