Skip to content

feat(vcr-ra): ship immediate-shift folding default-on — v0.15.0 (#390, #242)#467

Merged
avrabe merged 1 commit into
mainfrom
release/v0.15.0-imm-shift-fold-flip
Jun 24, 2026
Merged

feat(vcr-ra): ship immediate-shift folding default-on — v0.15.0 (#390, #242)#467
avrabe merged 1 commit into
mainfrom
release/v0.15.0-imm-shift-fold-flip

Conversation

@avrabe

@avrabe avrabe commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

What

Flips the immediate-shift folding peephole default-on (PR #463 landed it flag-off, gate now cleared). A constant shift amount the stack selector materialized into a scratch register (movw rM,#C; lsl rD,rN,rM) folds to the immediate form (lsl rD,rN,#C), dropping the dead movw — −1 instruction, −1 live register per folded shift.

Re-froze ARM goldens

control_step 316→304, flight_seam 866→774, flight_seam_flat 1006→910 (−200 B); signed_div_const unchanged (no register-shift folds). RV32 gate untouched (ARM-only peephole).

Validation (results preserved)

  • control_step 0x00210A55 differential 13/13; flat+inlined flight_algo 0x07FDF307 MATCH.
  • Opt-out (SYNTH_NO_IMM_SHIFT_FOLD=1) restores the v0.14.0 bytes; full workspace suite green; fmt/clippy/pin-sweep clean.
  • Validated bit-identical + a net cycle win on the dissolved hot path (−2 cyc/call, .text 100→90 B on gust_mix).

Cumulative dissolved hot-path: 64.0 → 58.0 (cmp→select) → 50.0 (local promotion) → 48.0 cyc/call.

Pin-swept 0.14.0→0.15.0; CHANGELOG added.

🤖 Generated with Claude Code

…#242)

Flips the immediate-shift folding peephole default-on (PR #463 landed it flag-off).
A constant shift amount the stack selector materialized into a scratch register
(`movw rM,#C; lsl rD,rN,rM`) now folds to the immediate form (`lsl rD,rN,#C`),
removing the dead `movw` — −1 instruction, −1 live register per folded shift.

Flip: arm_backend.rs default-ON with opt-out SYNTH_NO_IMM_SHIFT_FOLD=1. Re-froze
the ARM goldens (control_step 316→304, flight_seam 866→774, flight_seam_flat
1006→910 = −200 B; signed_div_const unchanged — no register-shift folds). RV32
gate untouched (ARM-only peephole).

Results preserved across the byte change: control_step 0x00210A55 (differential
13/13), flat+inlined flight_algo 0x07FDF307 (MATCH); opt-out restores the v0.14.0
bytes; full workspace suite green. Validated bit-identical + a net cycle win on the
dissolved hot path (−2 cyc/call, .text 100→90 B on gust_mix). Cumulative dissolved
hot-path: 64.0 → 58.0 (cmp→select) → 50.0 (local promotion) → 48.0 cyc/call.

Pin-swept 0.14.0→0.15.0; CHANGELOG added.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@avrabe avrabe merged commit cc203ec into main Jun 24, 2026
15 checks passed
@avrabe avrabe deleted the release/v0.15.0-imm-shift-fold-flip branch June 24, 2026 16:56
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.

1 participant