[PATCH] D79462: [WebAssembly] MC: Fix for data aliases with offsets (getelementptr)

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 5 18:22:11 PDT 2020


sbc100 created this revision.
Herald added subscribers: llvm-commits, dexonsmith, sunfish, JDevlieghere, aheejin, hiraditya, jgravelle-google, dschuff.
Herald added a project: LLVM.
sbc100 edited the summary of this revision.
sbc100 added reviewers: dschuff, kripken.

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

Of the 3 new tests added here the first 2 already passed, and
`test/MC/WebAssembly/offset.s` would previously crash.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79462

Files:
  llvm/lib/MC/WasmObjectWriter.cpp
  llvm/test/CodeGen/WebAssembly/aliases.ll
  llvm/test/MC/WebAssembly/alias.s
  llvm/test/MC/WebAssembly/offset.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79462.262277.patch
Type: text/x-patch
Size: 13403 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200506/441fd662/attachment.bin>


More information about the llvm-commits mailing list