Add fold-plaintext-masks for simple cleanup after implement-shift-network#2343
Merged
copybara-service[bot] merged 1 commit intogoogle:mainfrom Oct 24, 2025
Merged
Conversation
feff1c0 to
a5a3cf3
Compare
a5a3cf3 to
776db9f
Compare
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.
Fixes #2337
The sole idea here is to take repeated applications of plaintext one-hot masks and combine them via bitwise-and'ing the entries of the masks.
The example test still produces some inefficiencies:
These three lines show the problem
It extracts the first half, rotates it to the second half, then masks the second half (a no-op) before adding it to a copy of the first half. That second mask can be eliminated because the other half of the entries can be inferred to be zero. Something for a future slot analysis to handle...