Skip to content

Commit

Permalink
[WebAssembly] Add end-to-end codegen tests for wasm_simd128.h
Browse files Browse the repository at this point in the history
Add a test checking that each SIMD intrinsic produces the expected instruction.
Since this test spans both clang and LLVM, place it in a new
intrinsic-header-tests subdirectory of cross-project-tests.

This revives D101684 now that cross-project-tests exists. In practice, the tests
of lowering from wasm_simd128.h to LLVM IR were not as useful as this end-to-end
test.

Updates the version check of gdb in cross-project-tests/lit.cfg.py so that
unexpected version formats do not prevent the new tests from running.

Depends on D121661.

Differential Revision: https://reviews.llvm.org/D121662
  • Loading branch information
tlively committed Mar 17, 2022
1 parent 6316129 commit 7062094
Show file tree
Hide file tree
Showing 5 changed files with 1,287 additions and 2 deletions.
8 changes: 8 additions & 0 deletions cross-project-tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,18 @@ add_lit_testsuite(check-debuginfo "Running debuginfo tests"
DEPENDS ${CROSS_PROJECT_TEST_DEPS}
)

# Add alias for intrinsic header test subset.
add_lit_testsuite(check-intrinsic-headers "Running intrinsic header tests"
${CMAKE_CURRENT_BINARY_DIR}/intrinsic-header-tests
EXCLUDE_FROM_CHECK_ALL
DEPENDS ${CROSS_PROJECT_TEST_DEPS}
)

# Add check-cross-project-* targets.
add_lit_testsuites(CROSS_PROJECT ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${CROSS_PROJECT_TEST_DEPS}
)

set_target_properties(check-cross-project PROPERTIES FOLDER "Tests")
set_target_properties(check-debuginfo PROPERTIES FOLDER "Tests")
set_target_properties(check-intrinsic-headers PROPERTIES FOLDER "Tests")
3 changes: 3 additions & 0 deletions cross-project-tests/intrinsic-header-tests/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-*- rst -*-
This is a collection of tests to check that the expected assembly is generated
from clang intrinsic headers.
2 changes: 2 additions & 0 deletions cross-project-tests/intrinsic-header-tests/lit.local.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
if 'clang' not in config.available_features:
config.unsupported = True
Loading

0 comments on commit 7062094

Please sign in to comment.