[all-commits] [llvm/llvm-project] c8c1e4: [WebAssembly] Fix uses of -DAG and -NOT in wasm-ta...
Heejin Ahn via All-commits
all-commits at lists.llvm.org
Tue Apr 23 22:24:16 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c8c1e4e0e576f6e735a55dca4a2eb75ce73ee1db
https://github.com/llvm/llvm-project/commit/c8c1e4e0e576f6e735a55dca4a2eb75ce73ee1db
Author: Heejin Ahn <aheejin at gmail.com>
Date: 2024-04-24 (Wed, 24 Apr 2024)
Changed paths:
M clang/test/Preprocessor/wasm-target-features.c
Log Message:
-----------
[WebAssembly] Fix uses of -DAG and -NOT in wasm-target-features.c (#89777)
We are currently using `PREFIX-DAG` and `PREFIX-NOT` within a single
`PREFIX` test in a mixed way, but `-DAG` and `-NOT` do not work that
way. For example:
Result:
```
1
2
3
```
Test file:
```c
// CHECK-DAG: 3
// CHECK-DAG: 1
// CHECK-NOT: 2
```
This does not work. The last line `CHECK-NOT: 2` does not trigger any
error, because we've already covered all three lines (1~3) while
matching `CHECK-DAG: 3` and `CHECK-DAG: 1`, and FileCheck tries to check
the line `CHECK-NOT: 2` _after_ the line `3`.
Actually, we have
```c
// BLEEDING-EDGE-NOT:#define __wasm_reference_types__ 1{{$}}
```
even though reference-types is enabled in 'bleeding-edge' config, and
this has not triggered any error.
This section
(https://llvm.org/docs/CommandGuide/FileCheck.html#the-check-dag-directive)
explains the interactions between `CHECK-DAG` and `CHECK-NOT`s:
> As a result, the surrounding `CHECK-DAG:` directives cannot be
reordered, i.e. all occurrences matching `CHECK-DAG:` before
`CHECK-NOT:` must not fall behind occurrences matching `CHECK-DAG:`
after `CHECK-NOT:`.
So in order to test the 'include' lists and 'not-include' lists, we have
to run the tests twice with different prefixes. This splits `GENERIC`
and `BLEEDING-EDGE` tests in two configs (`***-INCLUDE` and `***`) to
test them correctly.
This also adds some spaces after colons, sorts the feature lists, and
adds `1{{$}}` to the `MVP` tests to make them consistent with `GENERIC`
and `BLEEDING-EDGE` tests.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list