Skip to content

feat: improve bitshift codegen#8442

Merged
TomAFrench merged 3 commits intomasterfrom
tf/improve-bitshift-codegen
May 12, 2025
Merged

feat: improve bitshift codegen#8442
TomAFrench merged 3 commits intomasterfrom
tf/improve-bitshift-codegen

Conversation

@TomAFrench
Copy link
Member

Description

Problem*

Resolves #8435

Summary*

I've reordered the instructions so that we end up doing the term without the 2 coefficient first so that we can reuse it for the next multiplication.

Additional Context

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2025

Changes to circuit sizes

Generated at commit: 5acb5778565df734686b519f746ff02c0415177b, compared to commit: f8c6943b023a9993b1733ce59a056f1e4a53f390

🧾 Summary (10% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
u128_type -14 ✅ -7.57% -14 ✅ -0.30%
bit_shifts_runtime -28 ✅ -6.03% -28 ✅ -0.67%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
binary_operator_overloading 114 (-7) -5.79% 4,256 (-7) -0.16%
u16_support 64 (-7) -9.86% 2,891 (-7) -0.24%
shift_right_overflow 45 (-7) -13.46% 2,859 (-7) -0.24%
u128_type 171 (-14) -7.57% 4,655 (-14) -0.30%
bit_shifts_runtime 436 (-28) -6.03% 4,155 (-28) -0.67%

@TomAFrench TomAFrench requested a review from a team May 10, 2025 13:39
@TomAFrench TomAFrench added this pull request to the merge queue May 12, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch May 12, 2025
@TomAFrench TomAFrench enabled auto-merge May 12, 2025 15:01
@TomAFrench TomAFrench added this pull request to the merge queue May 12, 2025
Merged via the queue into master with commit 5e3a04e May 12, 2025
116 checks passed
@TomAFrench TomAFrench deleted the tf/improve-bitshift-codegen branch May 12, 2025 15:22
github-merge-queue bot pushed a commit to AztecProtocol/aztec-packages that referenced this pull request May 13, 2025
Automated pull of nightly from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
fix: sign extend in signed cast
(noir-lang/noir#8264)
chore(fuzz): Do not use zero length types in the main input output
(noir-lang/noir#8465)
chore: fix visibility issues in test suite
(noir-lang/noir#8454)
chore: blackbox functions for ssa intepreter
(noir-lang/noir#8375)
feat: improve bitshift codegen
(noir-lang/noir#8442)
fix(ssa): Mark mutually recursive simple functions
(noir-lang/noir#8447)
fix: Fix nested trait dispatch with associated types
(noir-lang/noir#8440)
chore: carry visibilities in monomorphized AST
(noir-lang/noir#8439)
chore(tests): Add regression for now passing test
(noir-lang/noir#8441)
chore: use human-readable bytecode in snapshots
(noir-lang/noir#8164)
chore: bump external pinned commits
(noir-lang/noir#8445)
END_COMMIT_OVERRIDE

---------

Co-authored-by: AztecBot <tech@aztecprotocol.com>
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
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.

Suboptimal ACIRgen in shift_right_overflow

2 participants