aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/branchelim.go
diff options
context:
space:
mode:
authorBen Shi <powerman1st@163.com>2019-08-20 09:03:41 +0000
committerBen Shi <powerman1st@163.com>2019-08-28 02:29:25 +0000
commit731e6fc34ec1c99a72ac7c66db7a87786d918edf (patch)
tree35649dec44895480b294f2d13c4b31716bf3b834 /src/cmd/compile/internal/ssa/branchelim.go
parent9c67516ed69e6c5152b9f329f240f69f27f8004b (diff)
downloadgo-731e6fc34ec1c99a72ac7c66db7a87786d918edf.tar.gz
go-731e6fc34ec1c99a72ac7c66db7a87786d918edf.zip
cmd/compile: generate Select on WASM
This CL performs the branchelim optimization on WASM with its select instruction. And the total size of pkg/js_wasm decreased about 80KB by this optimization. Change-Id: I868eb146120a1cac5c4609c8e9ddb07e4da8a1d9 Reviewed-on: https://go-review.googlesource.com/c/go/+/190957 Run-TryBot: Ben Shi <powerman1st@163.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Richard Musiol <neelance@gmail.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/branchelim.go')
-rw-r--r--src/cmd/compile/internal/ssa/branchelim.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/ssa/branchelim.go b/src/cmd/compile/internal/ssa/branchelim.go
index c543686b3d..71c947d0d5 100644
--- a/src/cmd/compile/internal/ssa/branchelim.go
+++ b/src/cmd/compile/internal/ssa/branchelim.go
@@ -20,7 +20,7 @@ package ssa
func branchelim(f *Func) {
// FIXME: add support for lowering CondSelects on more architectures
switch f.Config.arch {
- case "arm64", "amd64":
+ case "arm64", "amd64", "wasm":
// implemented
default:
return