Source file test/fixedbugs/issue81976.go

     1  // compile
     2  
     3  // Copyright 2026 The Go Authors. All rights reserved.
     4  // Use of this source code is governed by a BSD-style
     5  // license that can be found in the LICENSE file.
     6  
     7  //go:build goexperiment.simd && amd64
     8  
     9  package p
    10  
    11  import "simd/archsimd"
    12  
    13  //go:noinline
    14  func fu() {}
    15  
    16  func f(z archsimd.Float32x8, m archsimd.Mask32x8, n int) archsimd.Float32x8 {
    17  	_ = func() {
    18  		z = z.Compress(m)
    19  		fu() // m is live across the call, so m is spilled
    20  		for range n {
    21  			z = z.Compress(m) // m is reloaded
    22  		}
    23  	}
    24  	return z
    25  }
    26  

View as plain text