Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle casts done via helpers and fold overflow operations in value n…
…umbering (dotnet#50450) * Added a missing license header * Added a test verifying that checked arithmetic is correct * Added a test verifying that checked casts are correct * Refactored VNEvalShouldFold * Refactored gtFoldExprConst to use helpers and follow the common code style * Fixed the comment stating TYP_BYREF has no zero value * Moved checking of overflow for arithmetic operations from gtFoldExprConst into a separate namespace * Implemented folding of overflow arithmetic in value numbering * Fixed some typos in valuenum.cpp/h * Added identity-based evaluation for overflow arithmetic * Refactored gtFoldExpr some more, moved the overflow checking logic to CheckedOps, implemented overflow checking for floating point -> integer casts * Implemented folding of checked casts in value numbering, started value numbering casts via helpers like normal casts * Fixed the formatting * Made the definition of var_types a standalone header so that it can be safely #included'ed in utils.h * Replaced uses of GTF_CALL_M_SPECIAL_INTRINSIC with the equivalent helpers * Fold cast via helpers in morph * Disable the test for checked casts on Mono
- Loading branch information