diff options
author | Carol Eidt <carol.eidt@microsoft.com> | 2016-06-21 11:10:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-21 11:10:47 -0700 |
commit | 0d462da2173627b454dbe74f33828e0698cd963b (patch) | |
tree | eb9f4d66fecb7286add53a089693ebf6dd6e8701 | |
parent | 51f010f8f219810282391a9e0dd08188bafd5a93 (diff) | |
parent | 845d34814cbe4f0f8cd342d04bd47fc7ef1c79b2 (diff) | |
download | coreclr-0d462da2173627b454dbe74f33828e0698cd963b.tar.gz coreclr-0d462da2173627b454dbe74f33828e0698cd963b.tar.bz2 coreclr-0d462da2173627b454dbe74f33828e0698cd963b.zip |
Merge pull request #5813 from mikedn/no-setflags
Remove useless gtSetFlags calls
-rwxr-xr-x | src/jit/codegenxarch.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/jit/codegenxarch.cpp b/src/jit/codegenxarch.cpp index 746f7af739..a2bdb3802a 100755 --- a/src/jit/codegenxarch.cpp +++ b/src/jit/codegenxarch.cpp @@ -7459,20 +7459,12 @@ void CodeGen::genIntToIntCast(GenTreePtr treeNode) inst_RV_RV(INS_mov, targetReg, sourceReg, srcType); } } - else if (treeNode->gtSetFlags() && isUnsignedDst && castOp->InReg() && (targetReg == sourceReg)) - { - // if we (might) need to set the flags and the value is in the same register - // and we have an unsigned value then use AND instead of MOVZX - noway_assert(ins == INS_movzx || ins == INS_mov); - ins = INS_AND; - } if (ins == INS_AND) { noway_assert((needAndAfter == false) && isUnsignedDst); /* Generate "and reg, MASK */ - insFlags flags = treeNode->gtSetFlags() ? INS_FLAGS_SET : INS_FLAGS_DONT_CARE; unsigned fillPattern; if (size == EA_1BYTE) fillPattern = 0xff; @@ -7481,7 +7473,7 @@ void CodeGen::genIntToIntCast(GenTreePtr treeNode) else fillPattern = 0xffffffff; - inst_RV_IV(INS_AND, targetReg, fillPattern, EA_4BYTE, flags); + inst_RV_IV(INS_AND, targetReg, fillPattern, EA_4BYTE); } #ifdef _TARGET_AMD64_ else if (ins == INS_movsxd) @@ -7516,8 +7508,7 @@ void CodeGen::genIntToIntCast(GenTreePtr treeNode) if (needAndAfter) { noway_assert(genTypeSize(dstType) == 2 && ins == INS_movsx); - insFlags flags = treeNode->gtSetFlags() ? INS_FLAGS_SET : INS_FLAGS_DONT_CARE; - inst_RV_IV(INS_AND, targetReg, 0xFFFF, EA_4BYTE, flags); + inst_RV_IV(INS_AND, targetReg, 0xFFFF, EA_4BYTE); } } } |