forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delete
TruncateOrSignExtend32
(dotnet#56904)
* Introduce SetValueTruncating As a less error-prone replacement of TruncateOrSignExtend32. Add a comment header explaining its intended use case. * Case $1 The code truncated, for unclear reasons (likely a copy & paste mistake), the wrong node. * Case $2 * Case $3 The old code was checking for the type of the shift node, which is what we want. So that SetValueTruncating sees this type, set it before setting the value itself. * Delete TruncateOrSignExtend32 Constant integer nodes never have GTF_UNSIGNED set on them. Additionally, zero-extending a TYP_INT const is incorrect.
- Loading branch information
1 parent
629f60e
commit c570efd
Showing
2 changed files
with
46 additions
and
39 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