PR Feedback
authorCarol Eidt <carol.eidt@microsoft.com>
Fri, 8 Nov 2019 01:16:14 +0000 (17:16 -0800)
committerCarol Eidt <carol.eidt@microsoft.com>
Fri, 8 Nov 2019 01:16:14 +0000 (17:16 -0800)
Commit migrated from https://github.com/dotnet/coreclr/commit/d0591cc7137a6583522369ec933abeae98e9485d

src/coreclr/src/jit/importer.cpp

index bd99d3a6ec71217d1a9ea2d44a4a6a45500c955d..16d8ff94de3d18dc9a873c6edaebbb7af33eaa2e 100644 (file)
@@ -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