Commit 730abc9
authored
Handle casts done via helpers and fold overflow operations in value numbering (#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 Mono1 parent 2e12730 commit 730abc9
File tree
26 files changed
+49589
-719
lines changed- src
- coreclr/jit
- tests
- JIT/Directed
- ConstantFolding
- Convert
26 files changed
+49589
-719
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| 251 | + | |
251 | 252 | | |
252 | 253 | | |
253 | 254 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4986 | 4986 | | |
4987 | 4987 | | |
4988 | 4988 | | |
| 4989 | + | |
| 4990 | + | |
| 4991 | + | |
4989 | 4992 | | |
4990 | 4993 | | |
4991 | 4994 | | |
| |||
0 commit comments