// has TYP_INT the result needs to be sign extended rather than zero extended.
tree->BashToConst(static_cast<int>(i1));
tree->AsIntCon()->gtFieldSeq = fieldSeq;
+
if (vnStore != nullptr)
{
fgValueNumberTreeConst(tree);
goto INTEGRAL_OVF;
}
lval1 = ltemp;
+#ifdef TARGET_64BIT
+ fieldSeq = GetFieldSeqStore()->Append(op1->AsIntCon()->gtFieldSeq, op2->AsIntCon()->gtFieldSeq);
+#endif
break;
case GT_SUB:
}
CNS_LONG:
-
+#if !defined(TARGET_64BIT)
if (fieldSeq != FieldSeqStore::NotAField())
{
+ assert(!"Field sequences on CNS_LNG nodes!?");
return tree;
}
+#endif // !defined(TARGET_64BIT)
JITDUMP("\nFolding long operator with constant nodes into a constant:\n");
DISPTREE(tree);
(tree->gtDebugFlags & GTF_DEBUG_NODE_LARGE));
tree->BashToConst(lval1);
+#ifdef TARGET_64BIT
+ tree->AsIntCon()->gtFieldSeq = fieldSeq;
+#endif
if (vnStore != nullptr)
{
fgValueNumberTreeConst(tree);
cns1->SetIconValue(foldedCns->IconValue());
cns1->SetVNsFromNode(foldedCns);
-
- if (oper == GT_ADD)
- {
- // Note that gtFoldExprConst doesn't maintain fieldSeq when folding constant
- // trees of TYP_LONG.
- cns1->gtFieldSeq = GetFieldSeqStore()->Append(cns1->gtFieldSeq, cns2->gtFieldSeq);
- }
+ cns1->gtFieldSeq = foldedCns->gtFieldSeq;
op1 = tree->gtGetOp1();
op1->SetVNsFromNode(tree);