xref: /llvm-project/llvm/test/CodeGen/WebAssembly/target-features-cpus.ll (revision 35cce408eef1a253df12c0023c993d78b180b1f3)
1; RUN: llc < %s -mcpu=mvp | FileCheck %s --check-prefixes MVP
2; RUN: llc < %s -mcpu=generic | FileCheck %s --check-prefixes GENERIC
3; RUN: llc < %s -mcpu=lime1 | FileCheck %s --check-prefixes LIME1
4; RUN: llc < %s | FileCheck %s --check-prefixes GENERIC
5; RUN: llc < %s -mcpu=bleeding-edge | FileCheck %s --check-prefixes BLEEDING-EDGE
6
7; Test that the target features section contains the correct set of features
8; depending on -mcpu= options.
9
10target triple = "wasm32-unknown-unknown"
11
12; mvp: should not contain the target features section
13; MVP-NOT: .custom_section.target_features,"",@
14
15; generic: +call-indirect-overlong, +multivalue, +mutable-globals, +reference-types, +sign-ext
16; GENERIC-LABEL: .custom_section.target_features,"",@
17; GENERIC-NEXT: .int8  8
18; GENERIC-NEXT: .int8  43
19; GENERIC-NEXT: .int8  11
20; GENERIC-NEXT: .ascii  "bulk-memory"
21; GENERIC-NEXT: .int8  43
22; GENERIC-NEXT: .int8  15
23; GENERIC-NEXT: .ascii  "bulk-memory-opt"
24; GENERIC-NEXT: .int8  43
25; GENERIC-NEXT: .int8  22
26; GENERIC-NEXT: .ascii  "call-indirect-overlong"
27; GENERIC-NEXT: .int8  43
28; GENERIC-NEXT: .int8  10
29; GENERIC-NEXT: .ascii  "multivalue"
30; GENERIC-NEXT: .int8  43
31; GENERIC-NEXT: .int8  15
32; GENERIC-NEXT: .ascii  "mutable-globals"
33; GENERIC-NEXT: .int8  43
34; GENERIC-NEXT: .int8  19
35; GENERIC-NEXT: .ascii  "nontrapping-fptoint"
36; GENERIC-NEXT: .int8  43
37; GENERIC-NEXT: .int8  15
38; GENERIC-NEXT: .ascii  "reference-types"
39; GENERIC-NEXT: .int8  43
40; GENERIC-NEXT: .int8  8
41; GENERIC-NEXT: .ascii  "sign-ext"
42
43; lime1: +bulk-memory-opt, +call-indirect-overlong, +extended-const, +multivalue,
44;        +mutable-globals, +nontrapping-fptoint, +sign-ext
45; LIME1-LABEL: .custom_section.target_features,"",@
46; LIME1-NEXT: .int8  7
47; LIME1-NEXT: .int8  43
48; LIME1-NEXT: .int8  15
49; LIME1-NEXT: .ascii  "bulk-memory-opt"
50; LIME1-NEXT: .int8  43
51; LIME1-NEXT: .int8  22
52; LIME1-NEXT: .ascii  "call-indirect-overlong"
53; LIME1-NEXT: .int8  43
54; LIME1-NEXT: .int8  14
55; LIME1-NEXT: .ascii  "extended-const"
56; LIME1-NEXT: .int8  43
57; LIME1-NEXT: .int8  10
58; LIME1-NEXT: .ascii  "multivalue"
59; LIME1-NEXT: .int8  43
60; LIME1-NEXT: .int8  15
61; LIME1-NEXT: .ascii  "mutable-globals"
62; LIME1-NEXT: .int8  43
63; LIME1-NEXT: .int8  19
64; LIME1-NEXT: .ascii  "nontrapping-fptoint"
65; LIME1-NEXT: .int8  43
66; LIME1-NEXT: .int8  8
67; LIME1-NEXT: .ascii  "sign-ext"
68
69; bleeding-edge: +atomics, +bulk-memory, +bulk-memory-opt,
70;                +call-indirect-overlong, +exception-handling,
71;                +extended-const, +fp16, +multimemory, +multivalue,
72;                +mutable-globals, +nontrapping-fptoint, +relaxed-simd,
73;                +reference-types, +simd128, +sign-ext, +tail-call
74; BLEEDING-EDGE-LABEL: .section  .custom_section.target_features,"",@
75; BLEEDING-EDGE-NEXT: .int8  16
76; BLEEDING-EDGE-NEXT: .int8  43
77; BLEEDING-EDGE-NEXT: .int8  7
78; BLEEDING-EDGE-NEXT: .ascii  "atomics"
79; BLEEDING-EDGE-NEXT: .int8  43
80; BLEEDING-EDGE-NEXT: .int8  11
81; BLEEDING-EDGE-NEXT: .ascii  "bulk-memory"
82; BLEEDING-EDGE-NEXT: .int8  43
83; BLEEDING-EDGE-NEXT: .int8  15
84; BLEEDING-EDGE-NEXT: .ascii  "bulk-memory-opt"
85; BLEEDING-EDGE-NEXT: .int8  43
86; BLEEDING-EDGE-NEXT: .int8  22
87; BLEEDING-EDGE-NEXT: .ascii  "call-indirect-overlong"
88; BLEEDING-EDGE-NEXT: .int8  43
89; BLEEDING-EDGE-NEXT: .int8  18
90; BLEEDING-EDGE-NEXT: .ascii  "exception-handling"
91; BLEEDING-EDGE-NEXT: .int8  43
92; BLEEDING-EDGE-NEXT: .int8  14
93; BLEEDING-EDGE-NEXT: .ascii  "extended-const"
94; BLEEDING-EDGE-NEXT: .int8  43
95; BLEEDING-EDGE-NEXT: .int8  4
96; BLEEDING-EDGE-NEXT: .ascii  "fp16"
97; BLEEDING-EDGE-NEXT: .int8  43
98; BLEEDING-EDGE-NEXT: .int8  11
99; BLEEDING-EDGE-NEXT: .ascii  "multimemory"
100; BLEEDING-EDGE-NEXT: .int8  43
101; BLEEDING-EDGE-NEXT: .int8  10
102; BLEEDING-EDGE-NEXT: .ascii  "multivalue"
103; BLEEDING-EDGE-NEXT: .int8  43
104; BLEEDING-EDGE-NEXT: .int8  15
105; BLEEDING-EDGE-NEXT: .ascii  "mutable-globals"
106; BLEEDING-EDGE-NEXT: .int8  43
107; BLEEDING-EDGE-NEXT: .int8  19
108; BLEEDING-EDGE-NEXT: .ascii  "nontrapping-fptoint"
109; BLEEDING-EDGE-NEXT: .int8  43
110; BLEEDING-EDGE-NEXT: .int8  15
111; BLEEDING-EDGE-NEXT: .ascii  "reference-types"
112; BLEEDING-EDGE-NEXT: .int8  43
113; BLEEDING-EDGE-NEXT: .int8  12
114; BLEEDING-EDGE-NEXT: .ascii  "relaxed-simd"
115; BLEEDING-EDGE-NEXT: .int8  43
116; BLEEDING-EDGE-NEXT: .int8  8
117; BLEEDING-EDGE-NEXT: .ascii  "sign-ext"
118; BLEEDING-EDGE-NEXT: .int8  43
119; BLEEDING-EDGE-NEXT: .int8  7
120; BLEEDING-EDGE-NEXT: .ascii  "simd128"
121; BLEEDING-EDGE-NEXT: .int8  43
122; BLEEDING-EDGE-NEXT: .int8  9
123; BLEEDING-EDGE-NEXT: .ascii  "tail-call"
124