Source file test/codegen/issue54467.go

     1  // asmcheck
     2  
     3  // Copyright 2022 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  func f1(x *[4]int, y *[4]int) {
    10  	// amd64:".*memmove"
    11  	*x = *y
    12  }
    13  func f2(x *[4]int, y [4]int) {
    14  	// amd64:-".*memmove"
    15  	*x = y
    16  }
    17  func f3(x *[4]int, y *[4]int) {
    18  	// amd64:-".*memmove"
    19  	t := *y
    20  	// amd64:-".*memmove"
    21  	*x = t
    22  }
    23  func f4(x *[4]int, y [4]int) {
    24  	// amd64:-".*memmove"
    25  	t := y
    26  	// amd64:-".*memmove"
    27  	*x = t
    28  }
    29  
    30  type T struct {
    31  	a [4]int
    32  }
    33  
    34  func f5(x, y *T) {
    35  	// amd64:-".*memmove"
    36  	x.a = y.a
    37  }
    38  func f6(x *T, y T) {
    39  	// amd64:-".*memmove"
    40  	x.a = y.a
    41  }
    42  func f7(x *T, y *[4]int) {
    43  	// amd64:-".*memmove"
    44  	x.a = *y
    45  }
    46  func f8(x *[4]int, y *T) {
    47  	// amd64:-".*memmove"
    48  	*x = y.a
    49  }
    50  
    51  func f9(x [][4]int, y [][4]int, i, j int) {
    52  	// amd64:-".*memmove"
    53  	x[i] = y[j]
    54  }
    55  
    56  func f10() []byte {
    57  	// amd64:-".*memmove"
    58  	return []byte("aReasonablyBigTestString")
    59  }
    60  

View as plain text