github.com/bir3/gocompiler@v0.3.205/src/cmd/compile/internal/ssa/_gen/ARM64latelower.rules (about) 1 // Copyright 2022 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // This file contains rules used by the laterLower pass. 6 // These are often the exact inverse of rules in ARM64.rules. 7 8 (ADDconst [c] x) && !isARM64addcon(c) => (ADD x (MOVDconst [c])) 9 (SUBconst [c] x) && !isARM64addcon(c) => (SUB x (MOVDconst [c])) 10 (ANDconst [c] x) && !isARM64bitcon(uint64(c)) => (AND x (MOVDconst [c])) 11 (ORconst [c] x) && !isARM64bitcon(uint64(c)) => (OR x (MOVDconst [c])) 12 (XORconst [c] x) && !isARM64bitcon(uint64(c)) => (XOR x (MOVDconst [c])) 13 (TSTconst [c] x) && !isARM64bitcon(uint64(c)) => (TST x (MOVDconst [c])) 14 (TSTWconst [c] x) && !isARM64bitcon(uint64(c)|uint64(c)<<32) => (TSTW x (MOVDconst [int64(c)])) 15 16 (CMPconst [c] x) && !isARM64addcon(c) => (CMP x (MOVDconst [c])) 17 (CMPWconst [c] x) && !isARM64addcon(int64(c)) => (CMPW x (MOVDconst [int64(c)])) 18 (CMNconst [c] x) && !isARM64addcon(c) => (CMN x (MOVDconst [c])) 19 (CMNWconst [c] x) && !isARM64addcon(int64(c)) => (CMNW x (MOVDconst [int64(c)])) 20 21 (ADDSconstflags [c] x) && !isARM64addcon(c) => (ADDSflags x (MOVDconst [c]))