From 30522bb80b69736cfdc53e6a44f0caceb0acc242 Mon Sep 17 00:00:00 2001 From: Bruce Forstall Date: Tue, 10 May 2016 16:43:55 -0700 Subject: [PATCH] Fix kill set of rep stos to include ECX There was a very strange condition in the existing code to only conditionally include ECX in the kill set. I convinced myself that for AMD64, this condition always holds in this code path (which makes a lot more sense anyway), so I removed the condition, and also made all this code execute for x86 as well. Fixes dotnet/coreclr#4817 Commit migrated from https://github.com/dotnet/coreclr/commit/6e05fb4c01eeb133aa8683a581e5becab8d20b62 --- src/coreclr/src/jit/lsra.cpp | 8 ++------ src/coreclr/tests/issues.targets | 12 ------------ 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/src/coreclr/src/jit/lsra.cpp b/src/coreclr/src/jit/lsra.cpp index 120f99e..facacaa 100644 --- a/src/coreclr/src/jit/lsra.cpp +++ b/src/coreclr/src/jit/lsra.cpp @@ -2527,14 +2527,10 @@ LinearScan::getKillSetForNode(GenTree* tree) case GenTreeBlkOp::BlkOpKindHelper: killMask = compiler->compHelperCallKillSet(CORINFO_HELP_MEMSET); break; -#ifdef _TARGET_AMD64_ +#ifdef _TARGET_XARCH_ case GenTreeBlkOp::BlkOpKindRepInstr: // rep stos kills RCX and RDI - killMask = RBM_RDI; - if (!initBlkNode->InitVal()->IsCnsIntOrI()) - { - killMask |= RBM_RCX; - } + killMask = RBM_RCX | RBM_RDI; break; #else case GenTreeBlkOp::BlkOpKindRepInstr: diff --git a/src/coreclr/tests/issues.targets b/src/coreclr/tests/issues.targets index 27d8beb..943c2e7 100644 --- a/src/coreclr/tests/issues.targets +++ b/src/coreclr/tests/issues.targets @@ -353,18 +353,6 @@ 3597 - - 4817 - - - 4817 - - - 4817 - - - 4817 - 4817 -- 2.7.4