File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -10759,14 +10759,14 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac)
10759
10759
10760
10760
if (!optValnumCSE_phase)
10761
10761
{
10762
- #ifdef TARGET_ARM64
10763
10762
if (tree->OperIs(GT_UMOD) && op2->IsIntegralConstUnsignedPow2())
10764
10763
{
10765
10764
// Transformation: a % b = a & (b - 1);
10766
10765
tree = fgMorphUModToAndSub(tree->AsOp());
10767
10766
op1 = tree->AsOp()->gtOp1;
10768
10767
op2 = tree->AsOp()->gtOp2;
10769
10768
}
10769
+ #ifdef TARGET_ARM64
10770
10770
// ARM64 architecture manual suggests this transformation
10771
10771
// for the mod operator.
10772
10772
// However, we do skip this optimization for ARM64 if the second operand
@@ -10779,7 +10779,7 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac)
10779
10779
// when 'b' is not a power of 2 constant and mod operator is signed.
10780
10780
// Lowering for XARCH does this optimization already,
10781
10781
// but is also done here to take advantage of CSE.
10782
- if (tree->OperIs(GT_MOD) && op2->IsIntegralConst() && !op2->IsIntegralConstAbsPow2())
10782
+ else if (tree->OperIs(GT_MOD) && op2->IsIntegralConst() && !op2->IsIntegralConstAbsPow2())
10783
10783
#endif
10784
10784
{
10785
10785
// Transformation: a % b = a - (a / b) * b;
You can’t perform that action at this time.
0 commit comments