]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: optimize const rotates for wasm architecture
authorAgniva De Sarker <agnivade@yahoo.co.in>
Sun, 8 Sep 2019 17:25:01 +0000 (22:55 +0530)
committerAgniva De Sarker <agniva.quicksilver@gmail.com>
Tue, 10 Sep 2019 09:12:32 +0000 (09:12 +0000)
commitb38be35e4c79fd3c5b9450e95cf092eaac094405
tree2f4de3c863fda4ed4d2bb24a27b2f85c5f7cea91
parentb6ec56bc26a89e9733390dd41fade5baace5a641
cmd/compile: optimize const rotates for wasm architecture

This removes the unnecessary code to check whether the shift
is within limits or not when the shift amount is a constant.

The rules hit 23034 times when building std cmd.

grep -E "Wasm.rules:(106|107|121|122|139|140)" rulelog | wc -l
23034

Reduces the size of pkg/js_wasm by 132 bytes.

Change-Id: I64a2b8faca08c3b5039d6a027d4676130d2db18d
Reviewed-on: https://go-review.googlesource.com/c/go/+/194239
Run-TryBot: Agniva De Sarker <agniva.quicksilver@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Richard Musiol <neelance@gmail.com>
src/cmd/compile/internal/ssa/gen/Wasm.rules
src/cmd/compile/internal/ssa/rewriteWasm.go