Audit for arith_offset intrinsic#1228
Merged
danielsn merged 6 commits intomodel-checking:mainfrom May 27, 2022
Merged
Conversation
tedinski
approved these changes
May 27, 2022
Contributor
tedinski
left a comment
There was a problem hiding this comment.
There's a note in your PR description that isn't reflected in the comments of codegen_offset (that these two instrinsics should have different behavior?)
Should there be a tracking issue for this? If so, can you create that and link to it from that function's comments too?
Approving because with that minor change to comments, LGTM
24d5318 to
6524c94
Compare
Contributor
Author
danielsn
approved these changes
May 27, 2022
77 tasks
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.
Description of changes:
This PR adds support for the
arith_offsetintrinsic (used bywrapping_offset) by using the already-implementedcodegen_offsetfunction.The documentation for
wrapping_offsetdefines it as a more permissive version ofoffsetwhich allows the computed offset to go out-of-bounds. Currently, we don't check incodegen_offsetthat the computed offset is within bounds to avoid spurious failures, so its definition should work for both.Resolved issues:
Part of #1163
Call-outs:
Testing:
How is this change tested? Adds 6 tests.
Is this a refactor change? No.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.