blob: a5c08f850e2282438659ded0c39367b773e90c63 [file] [log] [blame]
Thomas Lively3f34e1b82019-03-29 00:14:01 +00001; RUN: llc < %s -mattr=-atomics | FileCheck %s --check-prefixes CHECK,NO-ATOMICS
2; RUN: llc < %s -mattr=+atomics | FileCheck %s --check-prefixes CHECK,ATOMICS
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; CHECK-LABEL: .custom_section.target_features,"",@
13
14; -atomics
15; NO-ATOMICS-NEXT: .int8 1
16; NO-ATOMICS-NEXT: .int8 45
17; NO-ATOMICS-NEXT: .int8 7
18; NO-ATOMICS-NEXT: .ascii "atomics"
19; NO-ATOMICS-NEXT: .bss.foo,"",@
20
21; +atomics
22; ATOMICS-NEXT: .int8 1
23; ATOMICS-NEXT: .int8 43
24; ATOMICS-NEXT: .int8 7
25; ATOMICS-NEXT: .ascii "atomics"
26; ATOMICS-NEXT: .tbss.foo,"",@