From b42b21970c78b02418dc65b13a1a1111370f0aaa Mon Sep 17 00:00:00 2001 From: Carol Eidt Date: Thu, 7 Nov 2019 17:16:14 -0800 Subject: [PATCH] PR Feedback Commit migrated from https://github.com/dotnet/coreclr/commit/d0591cc7137a6583522369ec933abeae98e9485d --- src/coreclr/src/jit/importer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreclr/src/jit/importer.cpp b/src/coreclr/src/jit/importer.cpp index bd99d3a..16d8ff9 100644 --- a/src/coreclr/src/jit/importer.cpp +++ b/src/coreclr/src/jit/importer.cpp @@ -1385,9 +1385,9 @@ GenTree* Compiler::impAssignStructPtr(GenTree* destAddr, if ((dest == nullptr) && (destAddr->OperGet() == GT_ADDR)) { GenTree* destNode = destAddr->gtGetOp1(); - // If the actual destination is a local, or already a block node, or is a node that + // If the actual destination is a local, a GT_INDEX or a block node, or is a node that // will be morphed, don't insert an OBJ(ADDR) if it already has the right type. - if ((destNode->gtOper == GT_INDEX) || destNode->OperIsBlk() || (destNode->OperGet() == GT_LCL_VAR)) + if (destNode->OperIs(GT_LCL_VAR, GT_INDEX) || destNode->OperIsBlk()) { var_types destType = destNode->TypeGet(); // If one or both types are TYP_STRUCT (one may not yet be normalized), they are compatible -- 2.7.4