Repository navigation
t27b: add body-reads guard to countdown transform - #13439
Merged
Merged
Conversation
Dereference rhs2 (Box<Expr>) when assigning into the init Assign value field (Expr): *value = *rhs2 instead of *value = rhs2. Compile error introduced in PR #13422 squash; prevents t27b from building, causing all t27b differential tests to report infra failure. Refs #13421 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The countdown transform fired when the induction variable `iv` was read in the loop body (as array index or arithmetic operand), producing wrong values and 6 ratchet UNEXPECTED FAILUREs on master. Add `fn expr_has_var` + `fn stmts_has_var` recursive traversal over all Stmt/Expr variants and guard the transform with `!stmts_has_var(body, iv)`. Removes 2 blank lines to maintain net-zero foreign-budget. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
November 9, 2026 12:34
…7b-countdown-fix # Conflicts: # cli/t27b/src/lower.rs
Contributor
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.
Summary
lower.rsfired when the induction variableivwas read in the loop body (array index, arithmetic), producing wrong runtime valueswasm_module,HirApbBridge_new,glass_window,segment_tree,04_control_flow,orchestrator_bench)fn expr_has_var+fn stmts_has_varrecursive traversal; guard with!stmts_has_var(body, iv)— transform only fires whenivis never read in bodyTest plan
t27b-native-ratchetpasses with 0 UNEXPECTED FAILUREs for all 6 listed specst27b-native-linuxandt27b-native-macosstill passbench_audit.t27) still benefits:iis not read in that loop body, so transform fires correctlyCloses #13438
🤖 Generated with Claude Code
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com