Source file test/codegen/deadstore.go

     1  // asmcheck
     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  package codegen
     8  
     9  type S struct {
    10  	a, b, c, d, e int
    11  }
    12  
    13  func f1(s *S) {
    14  	// amd64:-`MOVUPS`
    15  	// arm64:-`STP` -`MOVD`
    16  	*s = S{}
    17  	*s = S{a: 3, b: 4, c: 5, d: 6, e: 7}
    18  }
    19  
    20  func f2(s *S) {
    21  	// amd64:-`MOVUPS`
    22  	// arm64:-`MOVD` -`FSTPQ`
    23  	*s = S{a: 1, b: 2, c: 3, d: 4, e: 5}
    24  	s.a = 3
    25  	s.b = 4
    26  	s.c = 5
    27  	s.d = 6
    28  	s.e = 7
    29  }
    30  

View as plain text