[mlir] Update tests for the sol.revert's signature change - #169
Merged
Conversation
abinavpp
force-pushed
the
app-dispatcher-revert-strings
branch
from
July 28, 2026 12:45
e4cc518 to
de4405d
Compare
There was a problem hiding this comment.
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.requiresignature 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
leaveand theclzbuiltin. - 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
force-pushed
the
app-dispatcher-revert-strings
branch
6 times, most recently
from
July 28, 2026 12:55
0a8d054 to
0df886e
Compare
PavelKopyl
force-pushed
the
kpv-fix-rever-sign
branch
from
July 28, 2026 13:11
c5a2562 to
afd7fdf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NomicFoundation/solx-llvm#133