Source file test/codegen/memcse.go

     1  // asmcheck
     2  
     3  // Copyright 2025 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  // Test common subexpression elimination of loads around other operations.
     8  
     9  package codegen
    10  
    11  func loadsAroundMemEqual(p *int, s1, s2 string) (int, bool) {
    12  	x := *p
    13  	eq := s1 == s2
    14  	y := *p
    15  	// arm64:"MOVD ZR, R0"
    16  	return x - y, eq
    17  }
    18  

View as plain text