1; RUN: llc < %s -mattr=-bulk-memory | FileCheck %s --check-prefixes NO-BULK-MEM
2; RUN: llc < %s -mattr=+bulk-memory | FileCheck %s --check-prefixes BULK-MEM
3
4; Test that the target features section contains -atomics or +atomics
5; for modules that have thread local storage in their source.
6
7target triple = "wasm32-unknown-unknown"
8
9@foo = internal thread_local global i32 0
10
11; -bulk-memory
12; NO-BULK-MEM-LABEL: .custom_section.target_features,"",@
13; NO-BULK-MEM-NEXT: .int8 1
14; NO-BULK-MEM-NEXT: .int8 45
15; NO-BULK-MEM-NEXT: .int8 10
16; NO-BULK-MEM-NEXT: .ascii "shared-mem"
17; NO-BULK-MEM-NEXT: .bss.foo,"",@
18
19; +bulk-memory
20; BULK-MEM-LABEL: .custom_section.target_features,"",@
21; BULK-MEM-NEXT: .int8 1
22; BULK-MEM-NEXT: .int8 43
23; BULK-MEM-NEXT: .int8 11
24; BULK-MEM-NEXT: .ascii "bulk-memory"
25; BULK-MEM-NEXT: .tbss.foo,"T",@
26