Uh oh!
There was an error while loading. Please reload this page.
JIT: Enable fgOptimizeRelationalComparisonWithCasts for EQ/NE - #128091
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
fe6c9b2 to
4654abbCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
BoyBaykiller
commented
May 21, 2026
@EgorBo PTAL. Simple change |
Uh oh!
There was an error while loading. Please reload this page.
…izeRelationalComparisonWithCasts-for-EQ-NE
There was a problem hiding this comment.
Pull request overview
Extends the cast-stripping optimization in fgOptimizeRelationalComparisonWithCasts to also apply to GT_EQ/GT_NE, not just the ordered relational operators. The pre-existing fgPushConstantsRight call is moved from the fgMorphSmpOp switch into fgOptimizeRelationalComparison itself, keeping behavior identical (since that case already covered EQ/NE).
Changes:
- Move
fgPushConstantsRightcall from thefgMorphSmpOpGT_EQ..GT_GT switch case intofgOptimizeRelationalComparison. - Relax the guard in
fgOptimizeRelationalComparisonfromOperIs(GT_LT, GT_LE, GT_GE, GT_GT)toOperIsCmpCompare(), enabling cast removal for EQ/NE.
Uh oh!
There was an error while loading. Please reload this page.
We were previously only calling that for
GT_LT, GT_LE, GT_GE, GT_GT.Example: