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

Exclude GT_ROL/ROR from ==/!= 0 compare peep optimization #7943

Merged
merged 1 commit into from
Nov 2, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/jit/lowerxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1176,8 +1176,12 @@ void Lowering::TreeNodeInfoInitShiftRotate(GenTree* tree)
MakeSrcContained(tree, shiftBy);
}

// Codegen of this tree node sets ZF and SF flags.
tree->gtFlags |= GTF_ZSF_SET;
// Codegen of shift oper sets ZF and SF flags.
// Note that Rotate Left/Right instructions don't set ZF and SF flags.
if (tree->OperIsShift())
{
tree->gtFlags |= GTF_ZSF_SET;
}
}

//------------------------------------------------------------------------
Expand Down