Skip to content

Commit 7062094

Browse files
committed
[WebAssembly] Add end-to-end codegen tests for wasm_simd128.h
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
1 parent 6316129 commit 7062094

File tree

5 files changed

+1287
-2
lines changed

5 files changed

+1287
-2
lines changed

cross-project-tests/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,18 @@ add_lit_testsuite(check-debuginfo "Running debuginfo tests"
7878
DEPENDS ${CROSS_PROJECT_TEST_DEPS}
7979
)
8080

81+
# Add alias for intrinsic header test subset.
82+
add_lit_testsuite(check-intrinsic-headers "Running intrinsic header tests"
83+
${CMAKE_CURRENT_BINARY_DIR}/intrinsic-header-tests
84+
EXCLUDE_FROM_CHECK_ALL
85+
DEPENDS ${CROSS_PROJECT_TEST_DEPS}
86+
)
87+
8188
# Add check-cross-project-* targets.
8289
add_lit_testsuites(CROSS_PROJECT ${CMAKE_CURRENT_SOURCE_DIR}
8390
DEPENDS ${CROSS_PROJECT_TEST_DEPS}
8491
)
8592

8693
set_target_properties(check-cross-project PROPERTIES FOLDER "Tests")
8794
set_target_properties(check-debuginfo PROPERTIES FOLDER "Tests")
95+
set_target_properties(check-intrinsic-headers PROPERTIES FOLDER "Tests")
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-*- rst -*-
2+
This is a collection of tests to check that the expected assembly is generated
3+
from clang intrinsic headers.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
if 'clang' not in config.available_features:
2+
config.unsupported = True

0 commit comments

Comments
 (0)