Skip to content

[mlir] Update tests for the sol.revert's signature change - #169

Merged
PavelKopyl merged 1 commit into
mainfrom
kpv-fix-rever-sign
Jul 28, 2026
Merged

[mlir] Update tests for the sol.revert's signature change#169
PavelKopyl merged 1 commit into
mainfrom
kpv-fix-rever-sign

Conversation

@PavelKopyl

@PavelKopyl PavelKopyl commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Copilot AI 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.

Pull request overview

Updates the MLIR lowering and test expectations to match recent IR changes around sol.revert/sol.require, modifier handling, and several additional codegen behaviors (Yul leave, clz, direct code.length, etc.), keeping the lit tests and semantic-test failure tracking in sync with the new lowering.

Changes:

  • Update MLIR codegen to reflect sol.revert/sol.require signature handling (including runtime string messages and stripping behavior), and improve/adjust external-call lowering (using-for public library calls, calldata returns).
  • Extend Yul-to-MLIR lowering to support leave and the clz builtin.
  • Refresh/add lit tests (init + EVM MLIR) and adjust the semtest failure allowlist accordingly.

Reviewed changes

Copilot reviewed 29 out of 31 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/mlirSemtestFailures.txt Removes multiple entries from the MLIR semantic-test failure allowlist and adds via-IR variants for modifier tests.
test/lit/mlirCodegen/revert.sol Updates FileCheck to reflect sol.revert no-longer requiring an explicit empty-string signature for revert().
test/lit/mlirCodegen/revert-require-runtime-msg.sol New test covering runtime revert/require messages (and strip mode semantics for impure messages).
test/lit/mlirCodegen/modifier.sol Updates checks for modifier lowering to sol.modifier_invocation + sol.yield.
test/lit/mlirCodegen/modifier-multi-result.sol Updates checks for modifier invocation/yield form in multi-result modifier scenario.
test/lit/mlirCodegen/mapping-default-copy.sol New init-MLIR test for mapping default/storage handling and returning mapping storage refs.
test/lit/mlirCodegen/library.sol Adds an attached public library call case (using for) and corresponding expected sol.ext_call.
test/lit/mlirCodegen/inline-asm.sol Adds inline assembly clz builtin coverage and updates expected lowering.
test/lit/mlirCodegen/inline-asm-functions.sol Adds Yul leave/early return coverage and updates expected lowering.
test/lit/mlirCodegen/ext-call-ref.sol Extends external-call reference tests (struct return, calldata return) and updates checks.
test/lit/mlirCodegen/EVM/revert-strings.sol Updates EVM backend checks consistent with revert-string handling and IR shape changes.
test/lit/mlirCodegen/EVM/modifier.sol Updates EVM backend checks for modifier invocation/inlining behavior changes.
test/lit/mlirCodegen/EVM/modifier-multi-result.sol Updates EVM backend checks for modifier multi-result lowering.
test/lit/mlirCodegen/EVM/mapping-default-copy.sol New EVM backend test for mapping default/storage handling.
test/lit/mlirCodegen/EVM/load-store-memory-cleanup.sol Updates expected constant ordering/placement in generated EVM MLIR.
test/lit/mlirCodegen/EVM/load-calldata-cleanup.sol Updates expected constant ordering/placement in generated EVM MLIR.
test/lit/mlirCodegen/EVM/library.sol Adds attached public library call coverage in EVM backend checks.
test/lit/mlirCodegen/EVM/inline-asm.sol Adds EVM backend coverage for inline assembly clz builtin lowering.
test/lit/mlirCodegen/EVM/fixedbytes-memory-store.sol Updates expected constant ordering/placement in generated EVM MLIR.
test/lit/mlirCodegen/EVM/ctor-fnptr.sol New EVM backend test for constructor function-pointer initialization/call patterns.
test/lit/mlirCodegen/EVM/bytes-to-storage-cleanup.sol Updates expected constant ordering/placement in generated EVM MLIR.
test/lit/mlirCodegen/EVM/array.sol Updates expected constant ordering/placement in generated EVM MLIR.
test/lit/mlirCodegen/ctor-fnptr.sol New init-MLIR test for constructor function-pointer initialization/call patterns.
test/lit/mlirCodegen/code.sol Adds coverage for address.code.length lowering and updates expected sol.code_size.
libsolidity/codegen/mlir/YulToMLIR.cpp Adds Yul leave lowering and registers clz builtin lowering.
libsolidity/codegen/mlir/SolidityToMLIR.cpp Refactors default initialization via utils, updates revert/require lowering for runtime messages + stripping, improves external-call lowering (using-for public library calls, calldata returns), adds code.length fast path, updates modifier invocation lowering.
libsolidity/codegen/mlir/Passes.cpp Switches from modifier-op lowering pass to modifier inlining pass in the MLIR pipeline.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@abinavpp
abinavpp force-pushed the app-dispatcher-revert-strings branch 6 times, most recently from 0a8d054 to 0df886e Compare July 28, 2026 12:55
Base automatically changed from app-dispatcher-revert-strings to main July 28, 2026 12:55

@abinavpp abinavpp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thank you!

@PavelKopyl
PavelKopyl merged commit e8565c9 into main Jul 28, 2026
2 checks passed
@PavelKopyl
PavelKopyl deleted the kpv-fix-rever-sign branch July 28, 2026 23:07
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.

3 participants