[clang] 4476727 - [WebAssembly] Add tests for generic CPU config (#80775)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 6 16:59:01 PST 2024
Author: Heejin Ahn
Date: 2024-02-06T16:58:58-08:00
New Revision: 44767278650227b30cf969170dc139197ce4338d
URL: https://github.com/llvm/llvm-project/commit/44767278650227b30cf969170dc139197ce4338d
DIFF: https://github.com/llvm/llvm-project/commit/44767278650227b30cf969170dc139197ce4338d.diff
LOG: [WebAssembly] Add tests for generic CPU config (#80775)
This adds tests for `generic` cpu configuration. We had tests for `mvp`
and `bleeding-edge` configs but not `generic`.
Added:
Modified:
clang/test/Preprocessor/wasm-target-features.c
Removed:
################################################################################
diff --git a/clang/test/Preprocessor/wasm-target-features.c b/clang/test/Preprocessor/wasm-target-features.c
index e50c5a4afe79c..eccd432aa8eee 100644
--- a/clang/test/Preprocessor/wasm-target-features.c
+++ b/clang/test/Preprocessor/wasm-target-features.c
@@ -146,6 +146,26 @@
// MVP-NOT:#define __wasm_multimemory__
// MVP-NOT:#define __wasm_relaxed_simd__
+// RUN: %clang -E -dM %s -o - 2>&1 \
+// RUN: -target wasm32-unknown-unknown -mcpu=generic \
+// RUN: | FileCheck %s -check-prefix=GENERIC
+// RUN: %clang -E -dM %s -o - 2>&1 \
+// RUN: -target wasm64-unknown-unknown -mcpu=generic \
+// RUN: | FileCheck %s -check-prefix=GENERIC
+//
+// GENERIC-DAG:#define __wasm_sign_ext__ 1{{$}}
+// GENERIC-DAG:#define __wasm_mutable_globals__ 1{{$}}
+// GENERIC-NOT:#define __wasm_nontrapping_fptoint__ 1{{$}}
+// GENERIC-NOT:#define __wasm_bulk_memory__ 1{{$}}
+// GENERIC-NOT:#define __wasm_simd128__ 1{{$}}
+// GENERIC-NOT:#define __wasm_atomics__ 1{{$}}
+// GENERIC-NOT:#define __wasm_tail_call__ 1{{$}}
+// GENERIC-NOT:#define __wasm_multimemory__ 1{{$}}
+// GENERIC-NOT:#define __wasm_exception_handling__ 1{{$}}
+// GENERIC-NOT:#define __wasm_multivalue__ 1{{$}}
+// GENERIC-NOT:#define __wasm_reference_types__ 1{{$}}
+// GENERIC-NOT:#define __wasm_extended_const__ 1{{$}}
+
// RUN: %clang -E -dM %s -o - 2>&1 \
// RUN: -target wasm32-unknown-unknown -mcpu=bleeding-edge \
// RUN: | FileCheck %s -check-prefix=BLEEDING-EDGE
More information about the cfe-commits
mailing list