[PATCH] D101684: [WebAssembly] Add end-to-end codegen tests for wasm_simd128.h

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 2 14:12:47 PDT 2021


tlively added a comment.

In D101684#2732395 <https://reviews.llvm.org/D101684#2732395>, @dblaikie wrote:

> In D101684#2732366 <https://reviews.llvm.org/D101684#2732366>, @tlively wrote:
>
>> In order to get the benefit of this end-to-end test from split tests like that, the LLVM test would have to be automatically generated from the clang test.
>
> Why is that? We don't do that for other test surface area between clang and LLVM.

The question this test answers is "Do the intrinsic functions generate the proper WebAssembly instructions?"  (Notably, the test reveals that in multiple cases, they don't). If we had separate C->IR and and IR->Wasm tests, they would be able to answer this question only if we were sure that the output of the C test matched the source of the IR test, and generating the IR test from the C test would be the best way to ensure that.

I understand your point that clang tests typically do not try to answer this kind of question, but this is an important question to be able to answer for the folks working on WebAssembly SIMD. So the options I see are:

1. Have this abnormal end-to-end test in clang.
2. Autogenerate an IR test from the C test so the composition of tests tells us what we want to know.
3. Host the test in some other repository.

Among those, the first is both the easiest to maintain and the most useful.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101684



More information about the llvm-commits mailing list