Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Extend flag reuse optimization to all relops
Browse files Browse the repository at this point in the history
  • Loading branch information
mikedn committed Sep 29, 2017
1 parent d5a4ade commit e793359
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/jit/codegenxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,8 @@ void CodeGen::genCodeForBinary(GenTree* treeNode)
}

// try to use an inc or dec
if (oper == GT_ADD && !varTypeIsFloating(treeNode) && src->isContainedIntOrIImmed() && !treeNode->gtOverflowEx())
if (oper == GT_ADD && !varTypeIsFloating(treeNode) && src->isContainedIntOrIImmed() && !treeNode->gtOverflowEx() &&
!treeNode->gtSetFlags())
{
if (src->IsIntegralConst(1))
{
Expand Down
6 changes: 2 additions & 4 deletions src/jit/lower.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2612,12 +2612,10 @@ GenTree* Lowering::LowerCompare(GenTree* cmp)
}
#endif // _TARGET_XARCH_
}
#ifdef _TARGET_XARCH_
else if (cmp->OperIs(GT_EQ, GT_NE))
#else // _TARGET_ARM64_
else
#endif
{
assert(cmp->OperIs(GT_EQ, GT_NE, GT_LE, GT_LT, GT_GE, GT_GT));

GenTree* op1 = cmp->gtGetOp1();
GenTree* op2 = cmp->gtGetOp2();

Expand Down

0 comments on commit e793359

Please sign in to comment.