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.
JIT: remove GTF_INX_REFARR_LAYOUT (dotnet#33098)
When morphing `GT_INDEX` nodes, we were inadvertently also setting `GTF_IND_NONFAULTING` for the `GT_IND` subtree for ref type arrays, because `GTF_IND_NONFAULTING` has the same value as `GTF_INX_REFARR_LAYOUT`. This turns out to be safe since in general there is an upstream bounds check to cover the null check from the indexing operation, so the fact that we were claiming the `GT_IND` can't fault is ok. A no diff change would remove the `GTF_INX_REFARR_LAYOUT` flag and then modify `fgMorphArrayIndex` to set `GTF_IND_NONFAULTING` for ref type arrays with bounds checks: ``` // If there's a bounds check, the the indir won't fault. if (bndsChk && (tree->gtType == TYP_REF)) { tree->gtFlags |= GTF_IND_NONFAULTING; } tree->gtFlags |= GTF_EXCEPT; ``` But there's no good reason to limit the above change to ref type arrays and no good reason to OR in `GTF_EXCEPT` when there are bounds checks. Closes dotnet#32647.
- Loading branch information
1 parent
ef3d5d7
commit 5c981af
Showing
6 changed files
with
29 additions
and
44 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
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