test/simd: add test for issue 77582

This addresses post-merge feedback from Cherry regarding CL 745460.

Updates #77582

Change-Id: I1165b8f499d2381b3d45e4a14f9d052d947b33c6
Reviewed-on: https://go-review.googlesource.com/c/go/+/748760
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
Eyalcfish
2026-02-25 07:39:49 +02:00
committed by Cherry Mui
parent 5b40e48a29
commit 78da9242cd

View File

@@ -1,29 +1,25 @@
// compile
//go:build goexperiment.simd && amd64
// Copyright 2026 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build goexperiment.simd && amd64
package ssa
package p
import (
"testing"
"cmd/compile/internal/archsimd"
"simd/archsimd"
)
func TestVPTERNLOGDPanic(t *testing.T) {
if !archsimd.X86.AVX512() {
t.Skip("Test only applies to AVX512")
}
func vpternlogdPanic() {
resultsMask := archsimd.Mask64x8{}
a := archsimd.Mask64x8FromBits(0xFF)
b := archsimd.Float64x8{}.Less(archsimd.Float64x8{})
for i := 0; i < 1; i++ {
resultsMask = a.Or(b).Or(resultsMask)
// This nested logic triggered the panic
// This nested logic triggered the panic in CL 745460
_ = resultsMask.And(resultsMask.And(archsimd.Mask64x8{}))
}
}