Conversation
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak Issue DetailsDraft PR.
|
|
@JulieLeeMSFT is this ready for review? |
|
Diffs show some unexpected size increases, eg Can you investigate? Also some diffs in minopts which we probably don't want. |
|
Yes, I am working on it.
|
There was a problem hiding this comment.
| if ((op1->gtOper == GT_CNS_INT) && !compIsForImportOnly()) | |
| if (opts.OptimizationEnabled() && (op1->gtOper == GT_CNS_INT) && !compIsForImportOnly()) |
We don't want to do this unless we're optimizing the method.
This should fix the diffs you are seeing with minopts.
There was a problem hiding this comment.
You should try constant-folding the op1 here, to increase the number of times we see constants.
op1 = gtFoldExpr(impPopStack().val);(replace line 8004 above)
There was a problem hiding this comment.
We probably don't need to show all BBs here?
… resolve regression in minopts.
|
|
@AndyAyersMS, it is ready for review. |





This PR folds unreachable cases in Switch early in
Importphase when switch value is GT_CNT_INT.Fixes #65368.
Below trees show the optimization example for the below scenario: