1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
|
// Code generated from _gen/AMD64latelower.rules using 'go generate'; DO NOT EDIT.
package ssa
import "internal/buildcfg"
func rewriteValueAMD64latelower(v *Value) bool {
switch v.Op {
case OpAMD64MOVBQZX:
return rewriteValueAMD64latelower_OpAMD64MOVBQZX(v)
case OpAMD64MOVLQZX:
return rewriteValueAMD64latelower_OpAMD64MOVLQZX(v)
case OpAMD64MOVWQZX:
return rewriteValueAMD64latelower_OpAMD64MOVWQZX(v)
case OpAMD64SARL:
return rewriteValueAMD64latelower_OpAMD64SARL(v)
case OpAMD64SARQ:
return rewriteValueAMD64latelower_OpAMD64SARQ(v)
case OpAMD64SHLL:
return rewriteValueAMD64latelower_OpAMD64SHLL(v)
case OpAMD64SHLQ:
return rewriteValueAMD64latelower_OpAMD64SHLQ(v)
case OpAMD64SHRL:
return rewriteValueAMD64latelower_OpAMD64SHRL(v)
case OpAMD64SHRQ:
return rewriteValueAMD64latelower_OpAMD64SHRQ(v)
}
return false
}
func rewriteValueAMD64latelower_OpAMD64MOVBQZX(v *Value) bool {
v_0 := v.Args[0]
// match: (MOVBQZX x)
// cond: zeroUpper56Bits(x,3)
// result: x
for {
x := v_0
if !(zeroUpper56Bits(x, 3)) {
break
}
v.copyOf(x)
return true
}
return false
}
func rewriteValueAMD64latelower_OpAMD64MOVLQZX(v *Value) bool {
v_0 := v.Args[0]
// match: (MOVLQZX x)
// cond: zeroUpper32Bits(x,3)
// result: x
for {
x := v_0
if !(zeroUpper32Bits(x, 3)) {
break
}
v.copyOf(x)
return true
}
return false
}
func rewriteValueAMD64latelower_OpAMD64MOVWQZX(v *Value) bool {
v_0 := v.Args[0]
// match: (MOVWQZX x)
// cond: zeroUpper48Bits(x,3)
// result: x
for {
x := v_0
if !(zeroUpper48Bits(x, 3)) {
break
}
v.copyOf(x)
return true
}
return false
}
func rewriteValueAMD64latelower_OpAMD64SARL(v *Value) bool {
v_1 := v.Args[1]
v_0 := v.Args[0]
// match: (SARL x y)
// cond: buildcfg.GOAMD64 >= 3
// result: (SARXL x y)
for {
x := v_0
y := v_1
if !(buildcfg.GOAMD64 >= 3) {
break
}
v.reset(OpAMD64SARXL)
v.AddArg2(x, y)
return true
}
return false
}
func rewriteValueAMD64latelower_OpAMD64SARQ(v *Value) bool {
v_1 := v.Args[1]
v_0 := v.Args[0]
// match: (SARQ x y)
// cond: buildcfg.GOAMD64 >= 3
// result: (SARXQ x y)
for {
x := v_0
y := v_1
if !(buildcfg.GOAMD64 >= 3) {
break
}
v.reset(OpAMD64SARXQ)
v.AddArg2(x, y)
return true
}
return false
}
func rewriteValueAMD64latelower_OpAMD64SHLL(v *Value) bool {
v_1 := v.Args[1]
v_0 := v.Args[0]
// match: (SHLL x y)
// cond: buildcfg.GOAMD64 >= 3
// result: (SHLXL x y)
for {
x := v_0
y := v_1
if !(buildcfg.GOAMD64 >= 3) {
break
}
v.reset(OpAMD64SHLXL)
v.AddArg2(x, y)
return true
}
return false
}
func rewriteValueAMD64latelower_OpAMD64SHLQ(v *Value) bool {
v_1 := v.Args[1]
v_0 := v.Args[0]
// match: (SHLQ x y)
// cond: buildcfg.GOAMD64 >= 3
// result: (SHLXQ x y)
for {
x := v_0
y := v_1
if !(buildcfg.GOAMD64 >= 3) {
break
}
v.reset(OpAMD64SHLXQ)
v.AddArg2(x, y)
return true
}
return false
}
func rewriteValueAMD64latelower_OpAMD64SHRL(v *Value) bool {
v_1 := v.Args[1]
v_0 := v.Args[0]
// match: (SHRL x y)
// cond: buildcfg.GOAMD64 >= 3
// result: (SHRXL x y)
for {
x := v_0
y := v_1
if !(buildcfg.GOAMD64 >= 3) {
break
}
v.reset(OpAMD64SHRXL)
v.AddArg2(x, y)
return true
}
return false
}
func rewriteValueAMD64latelower_OpAMD64SHRQ(v *Value) bool {
v_1 := v.Args[1]
v_0 := v.Args[0]
// match: (SHRQ x y)
// cond: buildcfg.GOAMD64 >= 3
// result: (SHRXQ x y)
for {
x := v_0
y := v_1
if !(buildcfg.GOAMD64 >= 3) {
break
}
v.reset(OpAMD64SHRXQ)
v.AddArg2(x, y)
return true
}
return false
}
func rewriteBlockAMD64latelower(b *Block) bool {
return false
}
|