This repository was archived by the owner on Jan 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -2736,6 +2736,13 @@ CodeGen::genCodeForTreeNode(GenTreePtr treeNode)
2736
2736
genProduceReg (treeNode);
2737
2737
break ;
2738
2738
2739
+ #if !defined(_TARGET_64BIT_)
2740
+ case GT_LONG:
2741
+ assert (!treeNode->isContained ());
2742
+ genConsumeRegs (treeNode);
2743
+ break ;
2744
+ #endif
2745
+
2739
2746
default :
2740
2747
{
2741
2748
#ifdef DEBUG
Original file line number Diff line number Diff line change @@ -13248,6 +13248,14 @@ bool GenTree::isContained() const
13248
13248
#endif
13249
13249
return false ;
13250
13250
13251
+ #if !defined(LEGACY_BACKEND) && !defined(_TARGET_64BIT_)
13252
+ case GT_LONG:
13253
+ // GT_LONG nodes are normally contained. The only exception is when the result
13254
+ // of a TYP_LONG operation is not used and this can only happen if the GT_LONG
13255
+ // is the last node in the statement (in linear order).
13256
+ return gtNext != nullptr ;
13257
+ #endif
13258
+
13251
13259
case GT_CALL:
13252
13260
// Note: if you hit this assert you are probably calling isContained()
13253
13261
// before the LSRA phase has allocated physical register to the tree nodes
Original file line number Diff line number Diff line change @@ -247,8 +247,16 @@ void Lowering::TreeNodeInfoInit(GenTree* stmt)
247
247
#if !defined(_TARGET_64BIT_)
248
248
249
249
case GT_LONG:
250
- // Passthrough
251
- info->srcCount = 0 ;
250
+ if (tree->gtNext == nullptr )
251
+ {
252
+ // An uncontained GT_LONG node needs to consume its source operands
253
+ info->srcCount = 2 ;
254
+ }
255
+ else
256
+ {
257
+ // Passthrough
258
+ info->srcCount = 0 ;
259
+ }
252
260
info->dstCount = 0 ;
253
261
break ;
254
262
You can’t perform that action at this time.
0 commit comments