Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8321025: Enable Neoverse N1 optimizations for Neoverse V2 #33

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/hotspot/cpu/aarch64/vm_version_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,9 @@ void VM_Version::initialize() {
}
}

// Neoverse N1, N2 and V1
if (_cpu == CPU_ARM && ((_model == 0xd0c || _model2 == 0xd0c)
|| (_model == 0xd49 || _model2 == 0xd49)
|| (_model == 0xd40 || _model2 == 0xd40))) {
// Neoverse N1, N2, V1, V2
if (_cpu == CPU_ARM && (model_is(0xd0c) || model_is(0xd49) ||
model_is(0xd40) || model_is(0xd4f))) {
if (FLAG_IS_DEFAULT(UseSIMDForMemoryOps)) {
FLAG_SET_DEFAULT(UseSIMDForMemoryOps, true);
}
Expand Down
4 changes: 4 additions & 0 deletions src/hotspot/cpu/aarch64/vm_version_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ enum Ampere_CPU_Model {
static int cpu_variant() { return _variant; }
static int cpu_revision() { return _revision; }

static bool model_is(int cpu_model) {
return _model == cpu_model || _model2 == cpu_model;
}

static bool is_zva_enabled() { return 0 <= _zva_length; }
static int zva_length() {
assert(is_zva_enabled(), "ZVA not available");
Expand Down