[Arm64] Fix UNROLL_LIMIT logic
authorSteve MacLean <sdmaclea.qdt@qualcommdatacenter.com>
Wed, 29 Nov 2017 21:14:04 +0000 (16:14 -0500)
committerSteve MacLean <sdmaclea.qdt@qualcommdatacenter.com>
Wed, 29 Nov 2017 21:40:31 +0000 (16:40 -0500)
src/jit/codegenarmarch.cpp
src/jit/lowerarmarch.cpp

index e3fab8a..a1ebfb8 100644 (file)
@@ -2044,7 +2044,7 @@ void CodeGen::genCodeForInitBlk(GenTreeBlk* initBlkNode)
 #ifdef _TARGET_ARM64_
     if (size != 0)
     {
-        assert(size > INITBLK_UNROLL_LIMIT);
+        assert((size > INITBLK_UNROLL_LIMIT) || !initVal->IsCnsIntOrI());
     }
 #endif // _TARGET_ARM64_
 
index 51d4a3b..2316501 100644 (file)
@@ -362,7 +362,7 @@ void Lowering::LowerBlockStore(GenTreeBlk* blkNode)
             // we should unroll the loop to improve CQ.
             // For reference see the code in lowerxarch.cpp.
 
-            if ((size != 0) && (size <= INITBLK_UNROLL_LIMIT))
+            if ((size != 0) && (size <= CPBLK_UNROLL_LIMIT))
             {
                 blkNode->gtBlkOpKind = GenTreeBlk::BlkOpKindUnroll;
             }