[clang] 5d81b1c - [WebAssembly] Add all remaining features to bleeding-edge (#90875)
via cfe-commits
cfe-commits at lists.llvm.org
Fri May 3 14:08:26 PDT 2024
Author: Heejin Ahn
Date: 2024-05-03T14:08:22-07:00
New Revision: 5d81b1c50a6eadc5d2ebe8c524dd2daa665402d7
URL: https://github.com/llvm/llvm-project/commit/5d81b1c50a6eadc5d2ebe8c524dd2daa665402d7
DIFF: https://github.com/llvm/llvm-project/commit/5d81b1c50a6eadc5d2ebe8c524dd2daa665402d7.diff
LOG: [WebAssembly] Add all remaining features to bleeding-edge (#90875)
I'm not entirely sure what the criteria for 'bleeding-edge' used to be,
but at this point it seems to be the set of all added features in LLVM.
This adds remaining features to bleeding-edge config.
Added:
Modified:
clang/lib/Basic/Targets/WebAssembly.cpp
clang/test/Preprocessor/wasm-target-features.c
Removed:
################################################################################
diff --git a/clang/lib/Basic/Targets/WebAssembly.cpp b/clang/lib/Basic/Targets/WebAssembly.cpp
index 2140451aab6d03..5a000314a72cee 100644
--- a/clang/lib/Basic/Targets/WebAssembly.cpp
+++ b/clang/lib/Basic/Targets/WebAssembly.cpp
@@ -159,12 +159,14 @@ bool WebAssemblyTargetInfo::initFeatureMap(
addGenericFeatures();
Features["atomics"] = true;
Features["bulk-memory"] = true;
+ Features["exception-handling"] = true;
+ Features["extended-const"] = true;
Features["half-precision"] = true;
Features["multimemory"] = true;
Features["nontrapping-fptoint"] = true;
Features["reference-types"] = true;
Features["tail-call"] = true;
- setSIMDLevel(Features, SIMD128, true);
+ setSIMDLevel(Features, RelaxedSIMD, true);
};
if (CPU == "generic") {
addGenericFeatures();
diff --git a/clang/test/Preprocessor/wasm-target-features.c b/clang/test/Preprocessor/wasm-target-features.c
index 5a4f85461d5aa2..9d49e3af603f82 100644
--- a/clang/test/Preprocessor/wasm-target-features.c
+++ b/clang/test/Preprocessor/wasm-target-features.c
@@ -194,26 +194,18 @@
//
// BLEEDING-EDGE-INCLUDE-DAG: #define __wasm_atomics__ 1{{$}}
// BLEEDING-EDGE-INCLUDE-DAG: #define __wasm_bulk_memory__ 1{{$}}
+// BLEEDING-EDGE-INCLUDE-DAG: #define __wasm_exception_handling__ 1{{$}}
+// BLEEDING-EDGE-INCLUDE-DAG: #define __wasm_extended_const__ 1{{$}}
// BLEEDING-EDGE-INCLUDE-DAG: #define __wasm_half_precision__ 1{{$}}
// BLEEDING-EDGE-INCLUDE-DAG: #define __wasm_multimemory__ 1{{$}}
// BLEEDING-EDGE-INCLUDE-DAG: #define __wasm_multivalue__ 1{{$}}
// BLEEDING-EDGE-INCLUDE-DAG: #define __wasm_mutable_globals__ 1{{$}}
// BLEEDING-EDGE-INCLUDE-DAG: #define __wasm_nontrapping_fptoint__ 1{{$}}
// BLEEDING-EDGE-INCLUDE-DAG: #define __wasm_reference_types__ 1{{$}}
+// BLEEDING-EDGE-INCLUDE-DAG: #define __wasm_relaxed_simd__ 1{{$}}
// BLEEDING-EDGE-INCLUDE-DAG: #define __wasm_sign_ext__ 1{{$}}
// BLEEDING-EDGE-INCLUDE-DAG: #define __wasm_simd128__ 1{{$}}
// BLEEDING-EDGE-INCLUDE-DAG: #define __wasm_tail_call__ 1{{$}}
-//
-// RUN: %clang -E -dM %s -o - 2>&1 \
-// RUN: -target wasm32-unknown-unknown -mcpu=bleeding-edge \
-// RUN: | FileCheck %s -check-prefix=BLEEDING-EDGE
-// RUN: %clang -E -dM %s -o - 2>&1 \
-// RUN: -target wasm64-unknown-unknown -mcpu=bleeding-edge \
-// RUN: | FileCheck %s -check-prefix=BLEEDING-EDGE
-//
-// BLEEDING-EDGE-NOT: #define __wasm_exception_handling__ 1{{$}}
-// BLEEDING-EDGE-NOT: #define __wasm_extended_const__ 1{{$}}
-// BLEEDING-EDGE-NOT: #define __wasm_relaxed_simd__ 1{{$}}
// RUN: %clang -E -dM %s -o - 2>&1 \
// RUN: -target wasm32-unknown-unknown -mcpu=bleeding-edge -mno-simd128 \
More information about the cfe-commits
mailing list