-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix horrifying bug in lossless_cast of a subtract #8155
Merged
Merged
Changes from 34 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
7d80f8b
Fix horrifying bug in lossless_cast of a subtract
abadams 9c33c94
Use constant integer intervals to analyze safety for lossless_cast
abadams e0f9f8e
Fix ARM and HVX instruction selection
abadams 214f0fd
Using constant_integer_bounds to strengthen FindIntrinsics
abadams 67855a5
Move new classes to new files
abadams bee38ce
Make the simplifier use ConstantInterval
abadams 7f4bb38
Handle bounds of narrower types in the simplifier too
abadams 6434210
Fix * operator. Add min/max/mod
abadams f308a8c
Add cache for constant bounds queries
abadams cffadd8
Fix ConstantInterval multiplication
abadams 2f14881
Add a simplifier rule which is apparently now necessary
abadams 26efb7c
Misc cleanups and test improvements
abadams b053ec6
Add missing files
abadams 413b4a6
Account for more aggressive simplification in fuse test
abadams 854122f
Remove redundant helpers
abadams 4a293b1
Add missing comment
abadams 0856319
clear_bounds_info -> clear_expr_info
abadams 16a706d
Remove bad TODO
abadams ecfae44
It's too late to change the semantics of fixed point intrinsics
abadams 66c56f1
Fix some UB
abadams 0fb8d38
Stronger assert in Simplify_Div
abadams c6065ff
Delete bad rewrite rules
abadams 6bcc66a
Fix bad test when lowering mul_shift_right
abadams c652667
Avoid UB in lowering of rounding_shift_right/left
abadams 1737a52
Add shifts to the lossless cast fuzzer
abadams ddab1cf
Fix bug in lossless_negate
abadams a0f1d23
Add constant interval test
abadams bf28e00
Merge remote-tracking branch 'origin/main' into abadams/fix_lossless_…
abadams ac5b13d
Rework find_mpy_ops to handle more structures
abadams c8f7e8f
Fix bugs in lossless_cast
abadams 9570818
Fix mul_shift_right expansion
abadams 7414ee6
Delete commented-out code
abadams c33dbfb
Don't introduce out-of-range shifts in lossless_cast
abadams 360add6
Merge branch 'main' into abadams/fix_lossless_cast_of_sub
steven-johnson 0409f2f
Merge remote-tracking branch 'origin/main' into abadams/fix_lossless_…
abadams 0b561c7
Some constant folding only happens after lowering intrinsics in codegen
abadams adb3a6b
Merge branch 'abadams/fix_lossless_cast_of_sub' of https://github.com…
abadams e90db04
Merge remote-tracking branch 'origin/main' into abadams/fix_lossless_…
abadams 19b1091
Merge remote-tracking branch 'origin/main' into abadams/fix_lossless_…
abadams ff352ef
Merge remote-tracking branch 'origin/main' into abadams/fix_lossless_…
abadams File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-0x8000
is probably clearer?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyone reading this code who doesn't know the bit layout of
-32768
should not be reading this code :-)