This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
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.
JIT: Transform X % C == 0 to X & (C-1) == 0 #25744
JIT: Transform X % C == 0 to X & (C-1) == 0 #25744
Changes from all commits
2459d77
37cacba
1e578c5
93e4c24
0e53872
8ec24d9
3ec39e0
a9c3508
6fc00a5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
@EgorBo I was trying to review that PR and lost the track of the changes, the first part
Transform X MOD C == 0 to X UMOD C == 0
looks clear, but why were this label and goto added?and it is really scary for me to have a back edge in a function like
fgMorphSmpOp
especially for 500 lines length.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.
@sandreenko I wanted to handle
X % C != 0
but couldn't just visitGT_NE
node - Roslyn emitscgt.un
(GT_GT) and morph converts it back to GT_NE but doesn't visit GT_NE after. So I have three options to fix the != 0 case: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.
Won't it be better to call
fgMorphSmpOp
recursively here?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.
@sandreenko will try, but I think there will be a few regressions