mirror of
https://github.com/golang/go.git
synced 2025-05-20 14:53:23 +00:00
cmd/compile: enable rewritings that are blocked by old backends
Old backends did not implement them, but SSA do. Change-Id: I543b2281dcf4bab0da37c9b1f26a5ef55a0ea11b Reviewed-on: https://go-review.googlesource.com/29278 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
parent
8607bed744
commit
882dd1c3ba
@ -3387,8 +3387,7 @@ func samecheap(a *Node, b *Node) bool {
|
||||
// The result of walkrotate MUST be assigned back to n, e.g.
|
||||
// n.Left = walkrotate(n.Left)
|
||||
func walkrotate(n *Node) *Node {
|
||||
//TODO: enable LROT on ARM64 once the old backend is gone
|
||||
if Thearch.LinkArch.InFamily(sys.MIPS64, sys.ARM64, sys.PPC64) {
|
||||
if Thearch.LinkArch.InFamily(sys.MIPS64, sys.PPC64) {
|
||||
return n
|
||||
}
|
||||
|
||||
@ -3647,11 +3646,6 @@ ret:
|
||||
func walkdiv(n *Node, init *Nodes) *Node {
|
||||
// if >= 0, nr is 1<<pow // 1 if nr is negative.
|
||||
|
||||
// TODO(minux)
|
||||
if Thearch.LinkArch.InFamily(sys.MIPS64, sys.PPC64) {
|
||||
return n
|
||||
}
|
||||
|
||||
if n.Right.Op != OLITERAL {
|
||||
return n
|
||||
}
|
||||
|
@ -54,8 +54,10 @@ var progtable = [ppc64.ALAST & obj.AMask]obj.ProgInfo{
|
||||
ppc64.AEQV & obj.AMask: {Flags: gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite},
|
||||
ppc64.AMULLD & obj.AMask: {Flags: gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite},
|
||||
ppc64.AMULLW & obj.AMask: {Flags: gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite},
|
||||
ppc64.AMULHD & obj.AMask: {Flags: gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite},
|
||||
ppc64.AMULHDU & obj.AMask: {Flags: gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite},
|
||||
ppc64.AMULHD & obj.AMask: {Flags: gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite},
|
||||
ppc64.AMULHDU & obj.AMask: {Flags: gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite},
|
||||
ppc64.AMULHW & obj.AMask: {Flags: gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite},
|
||||
ppc64.AMULHWU & obj.AMask: {Flags: gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite},
|
||||
ppc64.ADIVD & obj.AMask: {Flags: gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite},
|
||||
ppc64.ADIVDU & obj.AMask: {Flags: gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite},
|
||||
ppc64.ADIVW & obj.AMask: {Flags: gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite},
|
||||
|
Loading…
x
Reference in New Issue
Block a user