[all-commits] [llvm/llvm-project] 897297: [WebAssembly] Fix CPU tests in wasm-features.c (#8...
Heejin Ahn via All-commits
all-commits at lists.llvm.org
Tue Feb 6 17:07:45 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 897297e8b09ed6076f5dc6883b459b209bb9e29f
https://github.com/llvm/llvm-project/commit/897297e8b09ed6076f5dc6883b459b209bb9e29f
Author: Heejin Ahn <aheejin at gmail.com>
Date: 2024-02-06 (Tue, 06 Feb 2024)
Changed paths:
M clang/test/Driver/wasm-features.c
Log Message:
-----------
[WebAssembly] Fix CPU tests in wasm-features.c (#80900)
The CPU tests in this file are not working as intended. Specifying
`-mcpu=[mvp|generic|bleeding-edge]` in `clang` command line does NOT add
arguments like `-target-feature`, `+feature-name`, ... to `clang-14`
command line. Specifying `-mcpu=[mvp|generic|bleeding-edge]` in `clang`
command line will just add `-target-cpu` `[mvp|generic|bleeding-edge]`
to `clang-14` command line, and individual features are added here
within `clang-14` invocation:
https://github.com/llvm/llvm-project/blob/5b780c8c6c558ec283a9eec485a4f172df0f9fe1/clang/lib/Basic/Targets/WebAssembly.cpp#L150-L163
The reason these CPU tests are passing is because they only have `-NOT`
checks, and we don't emit `-target-feature` arguments for them anyway,
the test passes, but they don't check what they are supposed to check.
This make CPU tests only check `-target-cpu` lines instead of individual
features, which will not be emitted.
More information about the All-commits
mailing list