Repository navigation
fix(sir-opt): preserve memory and type semantics when hoisting loads - #1665
Merged
Conversation
Common branch-load hoisting could reuse a predecessor load from before an intervening store, so a subsequent display or comparison observed the old value. It also merged different register types and could move definitions across a successor with another predecessor. Reuse only the latest available matching load, stop across overlapping writes and host interactions, preserve result types, and require the predecessor to dominate both successors. Add direct SIR regressions for intervening stores, bit/logic result types, and multiple predecessors. Validation: optimizer unit suite and all-target clippy; the complete Celox suite also exercises this fix with the dependent FP changes (12,458 passed before updating the stack base). The dependent PR includes the end-to-end combinational display/assertion reproduction. Change-Id: Ic942e7594efecccfac235fdc894549cd151ae4ea
Contributor
Author
|
This pull request is part of a Mergify stack:
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
Merge Queue Status
This pull request spent 1 hour 55 minutes 43 seconds in the queue, including 1 hour 42 seconds running CI. Required conditions to merge
|
This was referenced Oct 21, 2026
mergify
Bot
deleted the
stack/tignear/feat/scalar-floating-point/preserve-memory-type-semantics-hoisting-loads--c942e759
branch
October 21, 2026 02:34
tignear
added a commit
that referenced
this pull request
Oct 21, 2026
Add Veryl f32/f64 and SystemVerilog shortreal/real/realtime scalar execution across the interpreter, native, Cranelift, and Wasm backends. Preserve IEEE storage while applying numeric arithmetic, comparisons, precision changes, integer conversions through 64 bits, and SV conversion functions at assignments, ports, and subroutine boundaries. Carry floating-point type metadata through runtime events and testbench arguments so display/write, assertion messages, and file output format numeric values with f/e/g, width, and precision. Include NAPI and browser helper integration and invalidate older native images with container version 22. The stale-load optimization exposed by combinational display capture was fixed in #1665, now included in master. Validation: - Pinned official sv-tests, full release-driver runs before/after: 20 fail-to-pass rows across 10 cases, no regressions (2state 462 -> 472 passes; 4state 464 -> 474). Update only those reviewed expectations. - Full Celox common suite before the master update: 12,458 passed, no failures; known exclusions retained. - After integrating current master: 776 SV analyzer tests and 3,450 integration tests passed, covering SystemVerilog, FP display/assertions, native image roundtrip in a fresh process, shared JIT cache. - Affected Rust unit tests and clippy, formatting, Wasm target checks, NAPI rebuild, JS tests and TypeScript checks. Two JS tests timed out under concurrent build load and passed on focused reruns. - New portable cases exercised through Icarus and Verilator. Known external shortreal/port/format differences are documented in crates/celox-test-suite/LIMITATIONS.md; expected results and retained verification baselines are unchanged. Veryl analyzer 0.22 mis-evaluates some FP constant expressions before lowering. Those reproductions retain their assertions with targeted ignores; default analyzer folding is preserved to avoid integer generate regressions. Runtime FP display/assertion tests remain enabled. Follow-up: #1657. Reject real-valued select indices, including parameters and expressions, while preserving integral indices and explicit real-to-integer conversions. A driven-input regression covers the legality check masked by an unrelated undriven-net error in the pinned upstream negative case. The symbolic bitvector bridge explicitly rejects FP operations rather than treating their payloads as integer arithmetic. The Python proof bridge also reports a typed unsupported result before proof execution. Six FP cases receive explicit reviewed proof-model exceptions, with zero reads and no proof artifacts; malformed IR and transport failures remain hard errors. The integer-folded FP case retains its assertions and receives a targeted known-failure entry for the existing Veryl bug #1657. Existing 771 coverage records were checked against the successful CI proof artifacts and preserved exactly; only the nine newly catalogued cases are added (including two aggregate cases from master). Targeted protocol and gate regressions are run locally; the full proof suite is not rerun locally. Deferred: wide integer and aggregate numeric conversions (#1653), and direct native FP instruction emission in place of helper calls (#1654). Refs #1401 Change-Id: Ie4380b73114505db30ac122288d528b078d28a62
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.
Common branch-load hoisting could reuse a predecessor load from before an intervening store, so a subsequent display or comparison observed the old value. It also merged different register types and could move definitions across a successor with another predecessor.
Reuse only the latest available matching load, stop across overlapping writes and host interactions, preserve result types, and require the predecessor to dominate both successors. Add direct SIR regressions for intervening stores, bit/logic result types, and multiple predecessors.
Validation: optimizer unit suite and all-target clippy; the complete Celox suite also exercises this fix with the dependent FP changes (12,458 passed before updating the stack base). The dependent PR includes the end-to-end combinational display/assertion reproduction.