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

Heejin Ahn via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun May 2 15:44:10 PDT 2021


aheejin added a comment.

I think there's a clear upside on keeping this within clang/.

1. As @tlively said, there are many number of instructions to test and keeping "C function - LLVM intrinsic" and "LLVM intrinsic - Wasm instruction" tests in sync without autogeneration will be hard and error-prone.

2. Also it is not always the case that we have 1-1-1 relationship of C intrinsic function - LLVM intrinsic - Wasm instruction. For some of these we don't have our own intrinsics but rather use LLVM's common intrinsics, and they don't always boil down to a single LLVM intrinsic. There are cases where a single C function call can be lowered to multiple instructions in the LLVM IR, which we try to pattern match and lower to a single Wasm instruction. This kind of relationship can't be tested easily so it will take significantly longer time to check if a single C function call will result in a single Wasm instruction.

It might be good to move this to clang/test/CodeGen though, if that's more suitable.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101684



More information about the cfe-commits mailing list