diff options
author | Heejin Ahn <aheejin@gmail.com> | 2024-04-24 14:23:54 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-24 14:23:54 +0900 |
commit | c8c1e4e0e576f6e735a55dca4a2eb75ce73ee1db (patch) | |
tree | 57ce2a2662e83a855fcf4d4847c7359973c5cb36 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | da1e3e8b9ab76e7dc6de1fa41116983cb7d0c510 (diff) | |
download | llvm-c8c1e4e0e576f6e735a55dca4a2eb75ce73ee1db.zip llvm-c8c1e4e0e576f6e735a55dca4a2eb75ce73ee1db.tar.gz llvm-c8c1e4e0e576f6e735a55dca4a2eb75ce73ee1db.tar.bz2 |
[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.
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions