File tree 2 files changed +803
-9
lines changed
src/cmd/compile/internal/ssa
2 files changed +803
-9
lines changed Original file line number Diff line number Diff line change 168
168
(Rsh8x32 x (MOVDconst [c])) && uint32(c) < 8 -> (SRAWconst (SignExt8to32 x) [c])
169
169
(Rsh8Ux32 x (MOVDconst [c])) && uint32(c) < 8 -> (SRWconst (ZeroExt8to32 x) [c])
170
170
171
+ // Lower bounded shifts first. No need to check shift value.
172
+ (Lsh64x(64|32|16|8) x y) && shiftIsBounded(v) -> (SLD x y)
173
+ (Lsh32x(64|32|16|8) x y) && shiftIsBounded(v) -> (SLW x y)
174
+ (Lsh16x(64|32|16|8) x y) && shiftIsBounded(v) -> (SLW x y)
175
+ (Lsh8x(64|32|16|8) x y) && shiftIsBounded(v) -> (SLW x y)
176
+ (Rsh64Ux(64|32|16|8) x y) && shiftIsBounded(v) -> (SRD x y)
177
+ (Rsh32Ux(64|32|16|8) x y) && shiftIsBounded(v) -> (SRW x y)
178
+ (Rsh16Ux(64|32|16|8) x y) && shiftIsBounded(v) -> (SRW (MOVHZreg x) y)
179
+ (Rsh8Ux(64|32|16|8) x y) && shiftIsBounded(v) -> (SRW (MOVBZreg x) y)
180
+ (Rsh64x(64|32|16|8) x y) && shiftIsBounded(v) -> (SRAD x y)
181
+ (Rsh32x(64|32|16|8) x y) && shiftIsBounded(v) -> (SRAW x y)
182
+ (Rsh16x(64|32|16|8) x y) && shiftIsBounded(v) -> (SRAW (MOVHreg x) y)
183
+ (Rsh8x(64|32|16|8) x y) && shiftIsBounded(v) -> (SRAW (MOVBreg x) y)
184
+
171
185
// non-constant rotates
172
186
// These are subexpressions found in statements that can become rotates
173
187
// In these cases the shift count is known to be < 64 so the more complicated expressions
You can’t perform that action at this time.
0 commit comments