Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / WebAssembly / alias-offset.s
blobe45b17d074f63c79f8ad0517a91679706aaea0c8
1 # RUN: llvm-mc -triple=wasm32-unknown-unknown -filetype=obj %s | llvm-objdump --triple=wasm32-unknown-unknown -d -t -r - | FileCheck %s
3 .section .data,"",@
4 foo:
5 .int32 0
6 .size foo, 4
7 sym_a:
8 .int32 1
9 .int32 2
10 .size sym_a, 8
12 .set sym_b, sym_a + 4
14 # CHECK-LABEL: SYMBOL TABLE:
15 # CHECK-NEXT: 00000000 l O DATA foo
16 # CHECK-NEXT: 00000004 l O DATA sym_a
17 # CHECK-NEXT: 00000008 l O DATA sym_b
18 # CHECK-NEXT: 00000001 l F CODE main
20 .text
21 .section .text,"",@
22 main:
23 .functype main () -> ()
24 i32.const 0
25 i32.const sym_a
26 i32.store sym_b
27 end_function
29 # CHECK-LABEL: <main>:
30 # CHECK-EMPTY:
31 # CHECK-NEXT: 3: 41 00 i32.const 0
32 # CHECK-NEXT: 5: 41 84 80 80 80 00 i32.const 4
33 # CHECK-NEXT: 00000006: R_WASM_MEMORY_ADDR_SLEB sym_a+0
34 # CHECK-NEXT: b: 36 02 88 80 80 80 00 i32.store 8
35 # CHECK-NEXT: 0000000d: R_WASM_MEMORY_ADDR_LEB sym_b+0
36 # CHECK-NEXT: 12: 0b end