1// asmcheck 2 3// Copyright 2019 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// Make sure we reuse large constant loads, if we can. 8// See issue 33580. 9 10package codegen 11 12const ( 13 A = 7777777777777777 14 B = 8888888888888888 15) 16 17func f(x, y uint64) uint64 { 18 p := x & A 19 q := y & A 20 r := x & B 21 // amd64:-"MOVQ.*8888888888888888" 22 s := y & B 23 24 return p * q * r * s 25} 26