Source file test/fixedbugs/issue81571.go
1 // run 2 3 //go:build goexperiment.simd && amd64 4 5 // Copyright 2026 The Go Authors. All rights reserved. 6 // Use of this source code is governed by a BSD-style 7 // license that can be found in the LICENSE file. 8 9 package main 10 11 import ( 12 "simd/archsimd" 13 ) 14 15 //go:noinline 16 func twoRegions() int { 17 n := 0 18 if archsimd.X86.AVX512() { 19 var v archsimd.Int32x16 20 n += int(v.ReduceSum()) 21 } 22 if archsimd.X86.AVX512() { 23 var w archsimd.Int32x16 24 n += int(w.ReduceSum()) 25 } 26 return n 27 } 28 29 func main() { 30 _ = twoRegions() 31 } 32