go/src
Cherry Zhang 7846500a5a cmd/compile: remove redundant constant shift rules
Normal shift rules plus constant folding are enough to generate
efficient shift-by-constant instructions.

Add test to make sure we don't generate comparisons for constant
shifts.

TODO: there are still constant shift rules on PPC64. If they
are removed, the constant folding rules are not enough to remove
all the test and mask stuff for constant shifts. Leave them in
for now.

Fixes #20663.

Change-Id: I724cc324aa8607762d0c8aacf9bfa641bda5c2a1
Reviewed-on: https://go-review.googlesource.com/60330
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
2017-08-31 02:08:48 +00:00
..
archive archive/tar: minor doc fixes 2017-08-30 18:01:08 +00:00
bufio Revert "bufio: make Reader.Peek invalidate Unreads" 2017-07-06 03:06:44 +00:00
builtin builtin: use type aliases for rune and byte 2017-06-07 00:42:59 +00:00
bytes bytes: Add missing examples to functions 2017-08-25 20:50:58 +00:00
cmd cmd/compile: remove redundant constant shift rules 2017-08-31 02:08:48 +00:00
compress compress/lzw: don't follow code == hi if last is invalid. 2017-06-08 01:27:37 +00:00
container
context context: fix lint warning “drop = 0 from declaration” 2017-08-30 17:06:30 +00:00
crypto all: join some chained ifs to unindent code 2017-08-29 20:57:41 +00:00
database/sql all: fix easy-to-miss typos 2017-08-23 03:07:12 +00:00
debug debug/macho: add missing file flags 2017-08-29 00:44:44 +00:00
encoding all: join some chained ifs to unindent code 2017-08-29 20:57:41 +00:00
errors
expvar
flag flag: document that custom usage functions are free to call os.Exit 2017-08-29 20:26:24 +00:00
fmt fmt: document verbs %b %d %o %x %X for printing pointers 2017-08-28 05:11:30 +00:00
go archive/tar: populate uname/gname/devmajor/devminor in FileInfoHeader 2017-08-30 00:52:31 +00:00
hash all: gofmt 2017-06-21 03:14:30 +00:00
html html: updated entity spec link 2017-08-08 04:29:35 +00:00
image image/gif: fix writeImageBlock with SubImages 2017-06-16 05:45:48 +00:00
index/suffixarray
internal runtime,cmd/trace: trace GC STW events 2017-08-29 21:54:55 +00:00
io io: add example for Pipe 2017-08-22 19:42:20 +00:00
log log: adds a Logger Output method Example 2017-07-16 03:57:11 +00:00
math math: add examples for trig functions 2017-08-25 20:26:19 +00:00
mime mime: ignore key on ParseMediaType when value don't pass RFC 2231 check 2017-08-29 21:10:56 +00:00
net net/url: make Parse+String round trip magnet URLs 2017-08-31 01:45:17 +00:00
os os: don't assume /bin/pwd in test, find it in $PATH 2017-08-29 20:08:16 +00:00
path path/filepath: add example for Ext 2017-08-25 16:24:37 +00:00
plugin {net,os/user,plugin}: eliminate unnecessary C round-trips 2017-08-17 18:14:16 +00:00
reflect reflect: handle types with unexported methods before exported ones 2017-08-23 23:48:49 +00:00
regexp regexp: examples for Regexp.Expand and Regexp.ExpandString functions 2017-08-28 15:34:19 +00:00
runtime runtime: add symbols for Linux syscall numbers on 386/amd64 2017-08-30 21:59:21 +00:00
sort sort: add examples for IntsAreSorted, Float64s and Float64sAreSorted 2017-08-28 17:29:29 +00:00
strconv all: remove some double spaces from comments 2017-08-26 15:09:09 +00:00
strings strings: use slice instead of list and array in Fields comment 2017-08-14 21:25:53 +00:00
sync all: join some chained ifs to unindent code 2017-08-29 20:57:41 +00:00
syscall syscall: drop dummy byte for oob in unixgram SendmsgN 2017-08-29 23:30:21 +00:00
testing all: remove some unused result params 2017-08-28 06:52:55 +00:00
text all: join some chained ifs to unindent code 2017-08-29 20:57:41 +00:00
time time: fix documentation of Round, Truncate behavior for d <= 0 2017-08-29 17:16:15 +00:00
unicode unicode: move scripts from FoldCategories to FoldScripts 2017-06-15 01:05:31 +00:00
unsafe all: remove some double spaces from comments 2017-08-26 15:09:09 +00:00
vendor/golang_org/x vendor: update vendored lif 2017-05-29 21:54:12 +00:00
Make.dist
all.bash
all.bat
all.rc
androidtest.bash
bootstrap.bash
buildall.bash
clean.bash
clean.bat
clean.rc
cmp.bash
iostest.bash misc/ios,src/iostest.bash: support GOIOS_DEVICE_ID 2017-08-28 16:37:25 +00:00
make.bash build: add `go env GOROOT` as default GOROOT_BOOTSTRAP value 2017-08-25 05:36:27 +00:00
make.bat
make.rc build: add `go env GOROOT` as default GOROOT_BOOTSTRAP value 2017-08-25 05:36:27 +00:00
naclmake.bash
nacltest.bash
race.bash
race.bat
run.bash
run.bat
run.rc