]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: improve floating point constant propagation
authorMichael Munday <mike.munday@ibm.com>
Thu, 14 Sep 2017 10:04:37 +0000 (11:04 +0100)
committerMichael Munday <mike.munday@ibm.com>
Thu, 14 Sep 2017 23:08:33 +0000 (23:08 +0000)
commit95b146e8ebf1687503fcf105f16e1f1eb0ea135e
tree1b88a2e04bf08e320bf62b3f861c9a1a5f4df615
parent40e25895e3ab998033cc9f7086332d046c7f608a
cmd/compile: improve floating point constant propagation

Add generic rules to propagate floating point constants through
comparisons and integer conversions. These new rules seldom trigger
in the standard library so there is no performance change, however
I think it is worth adding them anyway for completeness.

Change-Id: I9db5222746508a2996f1cafb72f4e0cf2541de07
Reviewed-on: https://go-review.googlesource.com/63795
Run-TryBot: Michael Munday <mike.munday@ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/asm_test.go
src/cmd/compile/internal/gc/float_test.go
src/cmd/compile/internal/ssa/gen/generic.rules
src/cmd/compile/internal/ssa/rewritegeneric.go