[go] internal/cpu: repair VNNI feature check

0 views
Skip to first unread message

David Chase (Gerrit)

unread,
Dec 18, 2025, 9:37:13 PM (2 days ago) Dec 18
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Cherry Mui, Go LUCI, Keith Randall, Keith Randall, Martin Möhrmann, Gopher Robot, golang-co...@googlegroups.com

David Chase submitted the change

Change information

Commit message:
internal/cpu: repair VNNI feature check

This is a pain to test.
Also the original test was never executed, because it was wrong.

It looks like processors that might lack this features
include Intel 11th generation and AMD Zen 4. These might
or might not have bit 2 set in the 7th cpuid "leaf" (SM4)
which is what the incorrect test was checking; the bug
is triggered by ^VNNI & SM4. Apparently the SM4 bit is
not usually set, else we would have seen a test failure.

The "Lion Cove" microarchitecture (Arrow Lake, Lunar Lake)
appears to trigger this problem, it's not clear if there are
others. It was hard to verify this from online information.

Fixes #76881.
Change-Id: I21be6b4f47134d81e89799b0f06f89fcb6563264
TryBot-Bypass: David Chase <drc...@google.com>
Reviewed-by: Cherry Mui <cher...@google.com>
Files:
  • M src/internal/cpu/cpu_x86.go
  • M src/simd/archsimd/internal/simd_test/simd_test.go
Change size: S
Delta: 2 files changed, 12 insertions(+), 8 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Cherry Mui
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result-1 by Go LUCI, TryBot-Bypass+1 by David Chase
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I21be6b4f47134d81e89799b0f06f89fcb6563264
Gerrit-Change-Number: 731240
Gerrit-PatchSet: 3
Gerrit-Owner: David Chase <drc...@google.com>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: David Chase <drc...@google.com>
Gerrit-Reviewer: Keith Randall <k...@golang.org>
Gerrit-Reviewer: Keith Randall <k...@google.com>
Gerrit-Reviewer: Martin Möhrmann <moeh...@google.com>
Gerrit-CC: Gopher Robot <go...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages