-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for negative constant (#2288)
### Ticket #2287 ### Problem description LLVM disabled `implicitTruncate` as default option for APInt constructor which triggered assertion for negative constant. It also caused failure for 64 bit constant as 64 bit constants are converted to 32 bit implicitly. ### What's changed - Use APInt object to extract constant values instead of basic data types which covers both positive and negative values. - Use truncation with sign saturation instead of implicit truncation. - TTIR->TTNN conversion for `ttir.constant` is also updated to consider signless integer as signed value as they can also store negative values. ### Checklist - [X] New/Existing tests provide coverage for changes
- Loading branch information
1 parent
2175af5
commit 340e05f
Showing
4 changed files
with
102 additions
and
75 deletions.
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
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