]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: constant fold SHLxconst of a constant on amd64
authorJosh Bleecher Snyder <josharian@gmail.com>
Sun, 23 Feb 2020 05:47:49 +0000 (21:47 -0800)
committerJosh Bleecher Snyder <josharian@gmail.com>
Wed, 26 Feb 2020 18:43:30 +0000 (18:43 +0000)
commitf510cddcd153ea83890b89227275648c04e65a1a
treea2bd99407d493951d540cf44212df4a84f767501
parent9c600949861fad2990fc7f661c4aa70fade24b0a
cmd/compile: constant fold SHLxconst of a constant on amd64

These rules fire in particular when comparing to a constant
string of length two. They should trigger even more after CL 220499.

file    before    after     Δ       %
compile 20639976  20635880  -4096   -0.020%
total   116003456 115999360 -4096   -0.004%

Change-Id: I21c1c02cf32d710d7a4eb12efab00f02796ccb84
Reviewed-on: https://go-review.googlesource.com/c/go/+/220694
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/gen/AMD64.rules
src/cmd/compile/internal/ssa/rewriteAMD64.go