Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit e08d951

Browse files
committed
Fix RyuJIT/arm32 GT_MUL_LONG node bashing
For RyuJIT/arm32, during decomposition we can bash GT_MUL to GT_MUL_LONG, which changes its type from GenTreeOp to GenTreeMultiRegOp. When we do this, we need to initialize the additional fields in GenTreeMultiRegOp. If we don't, we get asserts in JitDumps, and presumably other bad things happen.
1 parent 97d9d59 commit e08d951

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/jit/compiler.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,6 +1458,15 @@ inline void GenTree::SetOper(genTreeOps oper, ValueNumberUpdate vnUpdate)
14581458
gtIntCon.gtFieldSeq = nullptr;
14591459
}
14601460

1461+
#if !defined(LEGACY_BACKEND) && defined(_TARGET_ARM_)
1462+
if (oper == GT_MUL_LONG)
1463+
{
1464+
// We sometimes bash GT_MUL to GT_MUL_LONG, which converts it from GenTreeOp to GenTreeMultiRegOp.
1465+
gtMultiRegOp.gtOtherReg = REG_NA;
1466+
gtMultiRegOp.ClearOtherRegFlags();
1467+
}
1468+
#endif
1469+
14611470
if (vnUpdate == CLEAR_VN)
14621471
{
14631472
// Clear the ValueNum field as well.

0 commit comments

Comments
 (0)