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 datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
8target triple = "wasm32-unknown-unknown"
9
10@foo = internal thread_local global i32 0
11
12; -bulk-memory
13; NO-BULK-MEM-LABEL: .custom_section.target_features,"",@
14; NO-BULK-MEM-NEXT: .int8 1
15; NO-BULK-MEM-NEXT: .int8 45
16; NO-BULK-MEM-NEXT: .int8 10
17; NO-BULK-MEM-NEXT: .ascii "shared-mem"
18; NO-BULK-MEM-NEXT: .bss.foo,"",@
19
20; +bulk-memory
21; BULK-MEM-LABEL: .custom_section.target_features,"",@
22; BULK-MEM-NEXT: .int8 1
23; BULK-MEM-NEXT: .int8 43
24; BULK-MEM-NEXT: .int8 11
25; BULK-MEM-NEXT: .ascii "bulk-memory"
26; BULK-MEM-NEXT: .tbss.foo,"T",@
27