Skip to content

Commit

Permalink
Merge pull request #20525 from a7ehuo/system-arraycopy-perf-27-thresh…
Browse files Browse the repository at this point in the history
…old-64-128

x86: Increase inline reference arraycopy threshold
  • Loading branch information
0xdaryl authored Nov 13, 2024
2 parents ec1ae09 + f7dc1d8 commit edccce1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runtime/compiler/x/codegen/J9TreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 = 32;
int32_t repMovsThresholdBytes = comp->target().cpu.supportsFeature(OMR_FEATURE_X86_AVX512F) ? 128 : 64;
int32_t newThreshold = comp->getOptions()->getArraycopyRepMovsReferenceArrayThreshold();

if ((repMovsThresholdBytes < newThreshold) && ((newThreshold == 64) || (newThreshold == 128)))
if ((newThreshold == 32) || (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;
Expand Down

0 comments on commit edccce1

Please sign in to comment.