From 91686cdd92e93843bdebb64ce0b3c95a4a51283a Mon Sep 17 00:00:00 2001 From: Annabelle Huo Date: Thu, 28 Nov 2024 14:10:30 -0500 Subject: [PATCH] Revert "Merge pull request #20525 from a7ehuo/system-arraycopy-perf-27-threshold-64-128" This reverts commit edccce1ec177d1d9d8835094729c7c0bcc64a73a, reversing changes made to ec1ae09aa830560872bb9a432dcc99aa4ea91fb1. This reduces the threshold for reference arraycopy REP MOVS instructions back to 32 bytes --- runtime/compiler/x/codegen/J9TreeEvaluator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/compiler/x/codegen/J9TreeEvaluator.cpp b/runtime/compiler/x/codegen/J9TreeEvaluator.cpp index 5c2b2506903..e0a33c809ed 100644 --- a/runtime/compiler/x/codegen/J9TreeEvaluator.cpp +++ b/runtime/compiler/x/codegen/J9TreeEvaluator.cpp @@ -1899,10 +1899,10 @@ TR::Register *J9::X86::TreeEvaluator::arraycopyEvaluator(TR::Node *node, TR::Cod comp->target().cpu.supportsAVX() && comp->target().is64Bit(); - int32_t repMovsThresholdBytes = comp->target().cpu.supportsFeature(OMR_FEATURE_X86_AVX512F) ? 128 : 64; + int32_t repMovsThresholdBytes = 32; int32_t newThreshold = comp->getOptions()->getArraycopyRepMovsReferenceArrayThreshold(); - if ((newThreshold == 32) || (newThreshold == 64) || (newThreshold == 128)) + if ((repMovsThresholdBytes < newThreshold) && ((newThreshold == 64) || (newThreshold == 128))) { // If the CPU doesn't support AVX512, reduce the threshold to 64 bytes repMovsThresholdBytes = ((newThreshold == 128) && !comp->target().cpu.supportsFeature(OMR_FEATURE_X86_AVX512F)) ? 64 : newThreshold;