From 839d275ea687f86c0c0b93b522db047c0a816329 Mon Sep 17 00:00:00 2001 From: Mike Danes Date: Tue, 17 Jan 2017 20:32:16 +0200 Subject: [PATCH] Rebase fixes Commit migrated from https://github.com/dotnet/coreclr/commit/8686b6459a7c86a21fed6ee175a833d3fa8e953f --- src/coreclr/src/jit/codegenxarch.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/coreclr/src/jit/codegenxarch.cpp b/src/coreclr/src/jit/codegenxarch.cpp index 328a2ad..b504ece 100644 --- a/src/coreclr/src/jit/codegenxarch.cpp +++ b/src/coreclr/src/jit/codegenxarch.cpp @@ -6143,7 +6143,7 @@ void CodeGen::genCompareInt(GenTreePtr treeNode) { ins = INS_test; } - else if (!op1->isContained() && op2->IsIntegralConst(0)) + else if (op1->isUsedFromReg() && op2->IsIntegralConst(0)) { // We're comparing a register to 0 so we can generate "test reg1, reg1" // instead of the longer "cmp reg1, 0" @@ -6185,10 +6185,10 @@ void CodeGen::genCompareInt(GenTreePtr treeNode) assert(!varTypeIsUnsigned(type) || varTypeIsSmall(type)); // Small unsigned int types (TYP_BOOL can use anything) should use unsigned comparisons assert(!(varTypeIsSmallInt(type) && varTypeIsUnsigned(type)) || ((tree->gtFlags & GTF_UNSIGNED) != 0)); - // If op1 is smaller then it cannot be contained, we're probably missing a cast - assert((genTypeSize(op1Type) >= genTypeSize(type)) || !op1->isContainedMemoryOp()); - // If op2 is smaller then it cannot be contained, we're probably missing a cast - assert((genTypeSize(op2Type) >= genTypeSize(type)) || !op2->isContainedMemoryOp()); + // If op1 is smaller then it cannot be in memory, we're probably missing a cast + assert((genTypeSize(op1Type) >= genTypeSize(type)) || !op1->isUsedFromMemory()); + // If op2 is smaller then it cannot be in memory, we're probably missing a cast + assert((genTypeSize(op2Type) >= genTypeSize(type)) || !op2->isUsedFromMemory()); // If op2 is a constant then it should fit in the common type assert(!op2->IsCnsIntOrI() || genTypeValueFitsIn(op2->AsIntCon()->IconValue(), type)); -- 2.7.4