1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 12:43:36 +01:00
llvm-mirror/test/MC/WebAssembly/alias.s
Sam Clegg 7eacd92326 [WebAssembly] MC: Fix for data aliases with offsets (getelementptr)
For some reason we hadn't seen such cases in the wild which makes
me think that clang and rustc don't generate these.  In the bug which
reproduces it only occurs with LTO so my guess is that some LTO pass
is creating this alias + gep.

See: https://github.com/emscripten-core/emscripten/issues/8731

Differential Revision: https://reviews.llvm.org/D79462
2020-06-17 16:25:50 -07:00

16 lines
317 B
ArmAsm

# RUN: llvm-mc -triple=wasm32-unknown-unknown -filetype=obj %s | llvm-objdump -t - | FileCheck %s
.section .data,"",@
foo:
.int32 1
.size foo, 4
sym_a:
.int32 2
.size sym_a, 4
.set sym_b, sym_a
# CHECK: 00000000 l O DATA foo
# CHECK: 00000004 l O DATA sym_a
# CHECK: 00000004 l O DATA sym_b