mirror of
https://github.com/golang/go
synced 2024-11-24 08:50:14 -07:00
cmd/compile: reorder rotate lowering rules in AMD64.rules
These rules should belong to lowering rules not optimizations. Change-Id: I964d2c4b1d9bef0ede572978aff01cb11bf050ac Reviewed-on: https://go-review.googlesource.com/c/go/+/426197 Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Keith Randall <khr@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Wayne Zuo <wdvxdr@golangcn.org>
This commit is contained in:
parent
1f8e94e9f6
commit
af991a6d28
@ -563,6 +563,12 @@
|
|||||||
(PanicBounds [kind] x y mem) && boundsABI(kind) == 1 => (LoweredPanicBoundsB [kind] x y mem)
|
(PanicBounds [kind] x y mem) && boundsABI(kind) == 1 => (LoweredPanicBoundsB [kind] x y mem)
|
||||||
(PanicBounds [kind] x y mem) && boundsABI(kind) == 2 => (LoweredPanicBoundsC [kind] x y mem)
|
(PanicBounds [kind] x y mem) && boundsABI(kind) == 2 => (LoweredPanicBoundsC [kind] x y mem)
|
||||||
|
|
||||||
|
// lowering rotates
|
||||||
|
(RotateLeft8 ...) => (ROLB ...)
|
||||||
|
(RotateLeft16 ...) => (ROLW ...)
|
||||||
|
(RotateLeft32 ...) => (ROLL ...)
|
||||||
|
(RotateLeft64 ...) => (ROLQ ...)
|
||||||
|
|
||||||
// ***************************
|
// ***************************
|
||||||
// Above: lowering rules
|
// Above: lowering rules
|
||||||
// Below: optimizations
|
// Below: optimizations
|
||||||
@ -853,11 +859,6 @@
|
|||||||
((SHLL|SHRL|SARL|SHLXL|SHRXL|SARXL) x (ANDLconst [c] y)) && c & 31 == 31 => ((SHLL|SHRL|SARL|SHLXL|SHRXL|SARXL) x y)
|
((SHLL|SHRL|SARL|SHLXL|SHRXL|SARXL) x (ANDLconst [c] y)) && c & 31 == 31 => ((SHLL|SHRL|SARL|SHLXL|SHRXL|SARXL) x y)
|
||||||
((SHLL|SHRL|SARL|SHLXL|SHRXL|SARXL) x (NEGL <t> (ANDLconst [c] y))) && c & 31 == 31 => ((SHLL|SHRL|SARL|SHLXL|SHRXL|SARXL) x (NEGL <t> y))
|
((SHLL|SHRL|SARL|SHLXL|SHRXL|SARXL) x (NEGL <t> (ANDLconst [c] y))) && c & 31 == 31 => ((SHLL|SHRL|SARL|SHLXL|SHRXL|SARXL) x (NEGL <t> y))
|
||||||
|
|
||||||
(RotateLeft8 ...) => (ROLB ...)
|
|
||||||
(RotateLeft16 ...) => (ROLW ...)
|
|
||||||
(RotateLeft32 ...) => (ROLL ...)
|
|
||||||
(RotateLeft64 ...) => (ROLQ ...)
|
|
||||||
|
|
||||||
// rotate left negative = rotate right
|
// rotate left negative = rotate right
|
||||||
(ROLQ x (NEG(Q|L) y)) => (RORQ x y)
|
(ROLQ x (NEG(Q|L) y)) => (RORQ x y)
|
||||||
(ROLL x (NEG(Q|L) y)) => (RORL x y)
|
(ROLL x (NEG(Q|L) y)) => (RORL x y)
|
||||||
|
Loading…
Reference in New Issue
Block a user