-
Notifications
You must be signed in to change notification settings - Fork 5.2k
fix assertion merge for degenerate flow #48607
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
Conversation
|
@dotnet/jit-contrib , @AndyAyersMS |
|
https://dev.azure.com/dnceng/public/_build/results?buildId=1006551&view=results is green again with this change. |
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.
Looks Good
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.
Did you get a chance to look at other merges to see if any of them might be impacted by the same problem?
| { | ||
| pAssertionOut = mJumpDestOut[predBlock->bbNum]; | ||
|
|
||
| if (dupCount > 1) |
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.
This deserves a comment and some extra jit dump output, since it is an unusual 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.
Agree. Added.
Are you asking about CSE? Apart from AssertionProp, that's the only one that uses If you meant something else, can you please clarify other phases that does similar thing and I will double check. |
|
Did you get a chance to run diffs for this? Curious if it popped up anywhere else, and why we didn't notice it, if so. |
Yes, I ran libraries.pmi, tests and benchmarks superpmi collection and found no asmdiff. The original issue was in R2R with jitstress flag. While investigating, I tried to repro using JIT, reduce jitstress flags, etc. but none of them helped in reproing so I believe that it took a unique combination of things to get to this, so "no asm diff" don't surprise me. |
Sometimes, we have degenerate flow involving 2 blocks A and B such that
A->jumpDst == Bas well asA->bbNext == B. In such case we should merge the assertions of out edges from both flows into the B's in edge. Eventually we want to avoid generating such flows in redundant branch optimization. See #48609.Thanks Andy for help identify the root cause.
Fixes: #47101