[AArch64][SME2] Add multi-vector saturating doubling multiply high intrinsics
[llvm-project.git] / lld / test / wasm / duplicate-global-imports.s
blob8f057cd4f19e12022fd00172af966f1cf6a0b327
1 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.o
2 # RUN: wasm-ld --no-check-features -o %t1.wasm %t.o
3 # RUN: obj2yaml %t1.wasm | FileCheck %s
5 .global g1
6 .import_module g1, env
7 .import_name g1, g
8 .globaltype g1, i64, immutable
10 # Same import module/name/type as `g1`, should be de-duped.
11 .global g2
12 .import_module g2, env
13 .import_name g2, g
14 .globaltype g2, i64, immutable
16 # Imported as an i32 instead of i64, so should not be de-duped.
17 .global g3
18 .import_module g3, env
19 .import_name g3, g
20 .globaltype g3, i32, immutable
22 # Imported as mutable instead of immutable, so should not be de-duped.
23 .global g4
24 .import_module g4, env
25 .import_name g4, g
26 .globaltype g4, i64
28 .globl _start
29 _start:
30 .functype _start () -> ()
31 global.get g1
32 drop
33 global.get g2
34 drop
35 global.get g3
36 drop
37 global.get g4
38 drop
39 end_function
42 # CHECK: - Type: IMPORT
43 # CHECK-NEXT: Imports:
44 # CHECK-NEXT: - Module: env
45 # CHECK-NEXT: Field: g
46 # CHECK-NEXT: Kind: GLOBAL
47 # CHECK-NEXT: GlobalType: I64
48 # CHECK-NEXT: GlobalMutable: false
49 # CHECK-NEXT: - Module: env
50 # CHECK-NEXT: Field: g
51 # CHECK-NEXT: Kind: GLOBAL
52 # CHECK-NEXT: GlobalType: I32
53 # CHECK-NEXT: GlobalMutable: false
54 # CHECK-NEXT: - Module: env
55 # CHECK-NEXT: Field: g
56 # CHECK-NEXT: Kind: GLOBAL
57 # CHECK-NEXT: GlobalType: I64
58 # CHECK-NEXT: GlobalMutable: true
59 # CHECK-NEXT: - Type:
61 # CHECK: GlobalNames:
62 # CHECK-NEXT: - Index: 0
63 # CHECK-NEXT: Name: g1
64 # CHECK-NEXT: - Index: 1
65 # CHECK-NEXT: Name: g3
66 # CHECK-NEXT: - Index: 2
67 # CHECK-NEXT: Name: g4
68 # CHECK-NEXT: - Index: 3
69 # CHECK-NEXT: Name: __stack_pointer