diff --git a/src/coreclr/jit/morph.cpp b/src/coreclr/jit/morph.cpp index 288f7c16f4d9b6..82b55331a41dd7 100644 --- a/src/coreclr/jit/morph.cpp +++ b/src/coreclr/jit/morph.cpp @@ -12024,7 +12024,7 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac) effectiveOp1 = op1->gtEffectiveVal(); // If we are storing a small type, we might be able to omit a cast. - if (effectiveOp1->OperIs(GT_IND) && varTypeIsSmall(effectiveOp1)) + if (effectiveOp1->OperIs(GT_IND, GT_CLS_VAR) && varTypeIsSmall(effectiveOp1)) { if (!gtIsActiveCSE_Candidate(op2) && op2->OperIs(GT_CAST) && varTypeIsIntegral(op2->AsCast()->CastOp()) && !op2->gtOverflow())