inlCurArgInfo->argNode = curArgVal;
GenTree* lclVarTree;
- if (impIsAddressInLocal(curArgVal, &lclVarTree) && varTypeIsStruct(lclVarTree))
+
+ const bool isAddressInLocal = impIsAddressInLocal(curArgVal, &lclVarTree);
+ if (isAddressInLocal && varTypeIsStruct(lclVarTree))
{
inlCurArgInfo->argIsByRefToStructLocal = true;
#ifdef FEATURE_SIMD
INDEBUG(curArgVal->AsLclVar()->gtLclILoffs = argNum;)
}
- if ((curArgVal->OperKind() & GTK_CONST) ||
- ((curArgVal->gtOper == GT_ADDR) && (curArgVal->AsOp()->gtOp1->gtOper == GT_LCL_VAR)))
+ if ((curArgVal->OperKind() & GTK_CONST) || isAddressInLocal)
{
inlCurArgInfo->argIsInvariant = true;
if (inlCurArgInfo->argIsThis && (curArgVal->gtOper == GT_CNS_INT) && (curArgVal->AsIntCon()->gtIconVal == 0))