Repository navigation
Extend cast lowering coverage - #347
Merged
nihalpasham merged 1 commit intoJul 20, 2026
Merged
Conversation
Signed-off-by: Raul Estrada <[email protected]>
Collaborator
|
Thanks for the PR. LGTM. I kept the change as submitted. The tests add direct coverage for seven MIR cast routes and verify both the expected LLVM operation and the removal of the original For example, an Reviewer note: The focused tests and complete |
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.
Follow-up coverage related to #303; this PR does not close that issue because
its listed acceptance cases already landed independently on
main.Summary
Adds focused unit coverage for existing MIR cast lowering paths:
llvm.bitcast;llvm.sitofp;llvm_fptoui_sat_*;llvm.fpext/llvm.fptrunc;llvm.inttoptr;llvm.addrspacecastwith the destinationaddress space checked.
Every route asserts exactly one expected operation and no residual
mir.cast.The saturating paths also check the exact direct callee and declaration.
Maintainer verification
cargo fmt --all -- --checkmir-lowersuite — 135 passed; 7 doctests ignoredtests/lowering_test.rs; this PR introduces none.Test coverage only; no production lowering behavior changes.