[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 13:34:39 PDT 2021


tlively added a comment.

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

>> Assembly tests are generally discouraged in clang, but in this case we actually care about the specific instruction being generated from the intrinsics.
>
> I don't think this is a sound reason to add an end-to-end test in clang. The same is true of all clang tests, right? We ultimately care that accessing a parameter lowers to a certain register (because we're trying to implement a certain ABI) but we don't test that in clang - we test that we lower to certain IR which is guaranteed to lower to a certain register use - and then in LLVM we test that that IR does lower to that register.
>
> I think the same holds true here - and a clang test should verify the IR and an LLVM test should verify the assembly.

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. This wouldn't be so bad to do as long as the LLVM test also used autogenerated checks, but overall that would be extra complexity, verbosity, and indirection for no additional testing benefit, especially given that clang and LLVM are now in the same monorepo and can trivially be kept in sync. Do you think that extra complexity is worth it?


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