[PATCH] D101656: [WebAssembly] Fixup order of ins variables for table instructions

Paulo Matos via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 1 05:46:10 PDT 2021


pmatos added a comment.

In D101656#2730556 <https://reviews.llvm.org/D101656#2730556>, @dschuff wrote:

> I think all of emscripten's use of the table is still via the JS API (e.g. src/runtime_functions.js) so this probably won't break emscripten. It does seem likely that nobody is using these instructions via assembly.
> Is this the only change needed? Do we have no tests of these asm instructions anywhere in LLVM at all?

We don't have tests for the register based version of the assembly string afaiu. 
It would be great to be able to run unit tests that build machine instructions and check the expected asm, however I don't think there's an infrastructure for that. If there is, I would be happy to add those tests.
Another reason we didn't notice this was broken is because we do not execute this tests, otherwise we would have seen the values and indexes for the table set and others were incorrectly ordered. I am wondering if a wasm validator would have caught this, however even if it does as far as I understand the binaryen validator does not parse LLVM assembly files.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101656/new/

https://reviews.llvm.org/D101656



More information about the llvm-commits mailing list