]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile/internal/ssa/gen: generalize strength reduction.
authorAlexandru Moșoi <mosoi@google.com>
Fri, 17 Jul 2015 10:26:35 +0000 (12:26 +0200)
committerKeith Randall <khr@golang.org>
Wed, 22 Jul 2015 22:00:31 +0000 (22:00 +0000)
commit3e7e519c367f4ab5b2d9f863302cd0946fe74800
tree3e0b41449235958fbe86b6a6bccbef78d6a4c4d2
parent954d5ada291a969b2933f43d9a8f53c28fcb0982
[dev.ssa] cmd/compile/internal/ssa/gen: generalize strength reduction.

Handle multiplication with -1, 0, 3, 5, 9 and all powers of two.

Change-Id: I8e87e7670dae389aebf6f446d7a56950cacb59e0
Reviewed-on: https://go-review.googlesource.com/12350
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/gen/AMD64.rules
src/cmd/compile/internal/ssa/rewrite.go
src/cmd/compile/internal/ssa/rewriteAMD64.go