From af0e5463595ed6b23af02cfddcfea971640e5d46 Mon Sep 17 00:00:00 2001 From: Hyeongseok Oh Date: Wed, 1 Nov 2017 10:41:59 +0900 Subject: [PATCH] Fix slot size for transformed long Fix slot size as 2 for transformed long from double Use expected slot size for assertion check --- src/jit/lsraarmarch.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/jit/lsraarmarch.cpp b/src/jit/lsraarmarch.cpp index 08001fb..b13362d 100644 --- a/src/jit/lsraarmarch.cpp +++ b/src/jit/lsraarmarch.cpp @@ -463,22 +463,22 @@ void LinearScan::TreeNodeInfoInitCall(GenTreeCall* call) GenTree* putArgChild = argNode->gtGetOp1(); if (!varTypeIsStruct(putArgChild) && !putArgChild->OperIs(GT_FIELD_LIST)) { + unsigned expectedSlots = 1; #ifdef _TARGET_ARM_ // The `double` types could been transformed to `long` on arm, while the actual longs // have been decomposed. - const bool isDouble = (putArgChild->TypeGet() == TYP_LONG || putArgChild->TypeGet() == TYP_DOUBLE); - if (isDouble) + if (putArgChild->TypeGet() == TYP_LONG) { argNode->gtLsraInfo.srcCount = 2; + expectedSlots = 2; + } + else if (putArgChild->TypeGet() == TYP_DOUBLE) + { + expectedSlots = 2; } - - // We must not have a multi-reg struct; double uses 2 slots and isn't a multi-reg struct - assert((curArgTabEntry->numSlots == 1) || isDouble); -#else // !_TARGET_ARM_ - // Validate the slot count for this arg. - // We must not have a multi-reg struct - assert(curArgTabEntry->numSlots == 1); #endif // !_TARGET_ARM_ + // Validate the slot count for this arg. + assert(curArgTabEntry->numSlots == expectedSlots); } continue; } -- 2.7.4