-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Forbid creation of non-faulting null-check nodes. #77078
Merged
Merged
Changes from 10 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
d5e8d6a
Forbid creation of non-faulting null-check nodes.
JulieLeeMSFT 0a17d91
Skip null check if op1 cannot be null.
JulieLeeMSFT 37d8f34
x86 bug fix for Skip gtChangeOperToNullCheck if it cannot be null.
JulieLeeMSFT 6434f20
Fix Arm64 AVE: Do not lower indir when NOP.
JulieLeeMSFT 4c1fddd
formatting fix.
JulieLeeMSFT 98b6b90
Arm64 regression bug fix that removes const bool for a variable.
JulieLeeMSFT d9bb584
Preserve const and shorten expression.
JulieLeeMSFT 6bb0d26
Fix format.
JulieLeeMSFT 58a9b98
Merge branch 'main' into 44227
JulieLeeMSFT 7193ca3
Addressed code review feedback
JulieLeeMSFT c984a91
Forbid creation of non-faulting nullcheck node: Addressed feedback
JulieLeeMSFT e20a756
Forbid creation of non-faulting null-check nodes: Remove duplicate co…
JulieLeeMSFT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like this does anything, since
node
is a local, and is unused after the subsequent return.Does the
Append(node);
need to be moved below, just before thereturn
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Append(node)
sets class variableGenTree* m_result
, andnode
is used either (1) to be directly assigned tom_result
or (2) to makecomma
tree that is subsequently assigned tom_result
.So, I think the code is correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that
Append(node)
here happens before you setnode = m_compiler->gtNewNothingNode();
. The NothingNode gets created then never used. And for the non-faulting case, the original BLK node is still on the side-effect list.I think you want code more like this:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.