Skip to content

Migrate three legacy pass tests to lit - #9367

Merged
tlively merged 2 commits into
WebAssembly:mainfrom
Eduardo-Gv17:test/migrate-three-passes-to-lit
Nov 9, 2026
Merged

tlively merged 2 commits into
WebAssembly:mainfrom
Eduardo-Gv17:test/migrate-three-passes-to-lit

Conversation

@Eduardo-Gv17

Copy link
Copy Markdown
Contributor

Migrate three legacy pass tests to lit:

  • duplicate-import-elimination
  • remove-unused-names_precompute
  • set-globals

Each test now includes its RUN command and FileCheck expectations.
Remove the corresponding legacy input/output files and preserve the
set-globals pass arguments (foo=1337,bar=42).

No optimization pass implementations are changed!

Validation:

  • Built wasm-opt from base commit 95a214d.
  • Ran the three migrated tests with binaryen-lit: all three passed.
  • git diff --cached --check reported no whitespace errors.

Related to #8520.

@Eduardo-Gv17
Eduardo-Gv17 requested a review from a team as a code owner November 8, 2026 16:04
@tlively
tlively requested review from tlively and removed request for a team November 8, 2026 16:04

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces new LIT-style tests for several WebAssembly optimization passes in wasm-opt, specifically targeting duplicate import elimination, the interaction between unused name removal and precomputation, and setting globals via pass arguments. These tests replace older, separate test files to streamline the test suite. I have no feedback to provide as there are no review comments and the changes consist of clean test additions.

@tlively tlively left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM besides the one comment.

@@ -0,0 +1,42 @@
;; RUN: foreach %s %t wasm-opt --duplicate-import-elimination -S -o - | filecheck %s

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use scripts/update_lit_checks.py --all-items to generate the test output for this file as well..

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! I regenerated the checks with "--all-items" and reran the three migrated tests. All three passed. Thanks for the review :))

@tlively
tlively enabled auto-merge (squash) November 9, 2026 05:02
@tlively

tlively commented Nov 9, 2026

Copy link
Copy Markdown
Member

Thanks for the PR!

@tlively
tlively merged commit e4599fa into WebAssembly:main Nov 9, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants