From b82ba8b2940673d4ca61bc3407eb022e32153e5a Mon Sep 17 00:00:00 2001 From: sivarv Date: Tue, 1 Nov 2016 17:00:32 -0700 Subject: [PATCH] Rotate Left/Right xarch instructions don't set ZF and ZF flag. --- src/jit/lowerxarch.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/jit/lowerxarch.cpp b/src/jit/lowerxarch.cpp index a98cc8e9fdca..e7af9f022366 100644 --- a/src/jit/lowerxarch.cpp +++ b/src/jit/lowerxarch.cpp @@ -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; + } } //------------------------------------------------------------------------