From: Sergey Andreenko Date: Wed, 5 Feb 2020 00:51:44 +0000 (-0800) Subject: Additional checks and returns, no diffs. X-Git-Tag: submit/tizen/20210909.063632~9857^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=01b975113cd7b3e4026b57780a2bff218e0704ef;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Additional checks and returns, no diffs. --- diff --git a/src/coreclr/src/jit/gentree.cpp b/src/coreclr/src/jit/gentree.cpp index a829c4c..1bfb4bd 100644 --- a/src/coreclr/src/jit/gentree.cpp +++ b/src/coreclr/src/jit/gentree.cpp @@ -16869,6 +16869,9 @@ CORINFO_CLASS_HANDLE Compiler::gtGetStructHandleIfPresent(GenTree* tree) case GT_OBJ: structHnd = tree->AsObj()->GetLayout()->GetClassHandle(); break; + case GT_BLK: + structHnd = tree->AsBlk()->GetLayout()->GetClassHandle(); + break; case GT_CALL: structHnd = tree->AsCall()->gtRetClsHnd; break; @@ -16944,6 +16947,10 @@ CORINFO_CLASS_HANDLE Compiler::gtGetStructHandleIfPresent(GenTree* tree) } } } + else if (addr->OperGet() == GT_LCL_VAR) + { + structHnd = gtGetStructHandleIfPresent(addr); + } } } break; diff --git a/src/coreclr/src/jit/instr.cpp b/src/coreclr/src/jit/instr.cpp index 695cd0b..7a0a6c6 100644 --- a/src/coreclr/src/jit/instr.cpp +++ b/src/coreclr/src/jit/instr.cpp @@ -1817,6 +1817,7 @@ instruction CodeGenInterface::ins_Load(var_types srcType, bool aligned /*=false* */ instruction CodeGen::ins_Copy(var_types dstType) { + assert(emitTypeActSz[dstType] != 0); #if defined(TARGET_XARCH) if (varTypeIsSIMD(dstType)) { diff --git a/src/coreclr/src/jit/lsraxarch.cpp b/src/coreclr/src/jit/lsraxarch.cpp index 7d09369..900aa4a 100644 --- a/src/coreclr/src/jit/lsraxarch.cpp +++ b/src/coreclr/src/jit/lsraxarch.cpp @@ -2751,12 +2751,7 @@ int LinearScan::BuildCast(GenTreeCast* cast) // int LinearScan::BuildIndir(GenTreeIndir* indirTree) { - // If this is the rhs of a block copy (i.e. non-enregisterable struct), - // it has no register requirements. - if (indirTree->TypeGet() == TYP_STRUCT) - { - return 0; - } + assert(indirTree->TypeGet() != TYP_STRUCT); // Don't expect a struct type here. #ifdef FEATURE_SIMD RefPosition* internalFloatDef = nullptr;