]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: add arm64 rules to optimize go codes to constant 0
authorfanzha02 <fannie.zhang@arm.com>
Tue, 23 Mar 2021 07:35:30 +0000 (15:35 +0800)
committerfannie zhang <Fannie.Zhang@arm.com>
Fri, 26 Mar 2021 01:57:35 +0000 (01:57 +0000)
commit3a0061822e0bfa79f2a464807e12970f588e3e94
treeb96494a288bbf787aea804c13a53216b09134d88
parentb587b050ca55661120912b5a1d6071a1922ad0ea
cmd/compile: add arm64 rules to optimize go codes to constant 0

Optimize the following codes to constant 0.

  function shift (x uint32) uint64 {
    return uint64(x) >> 32
  }

Change-Id: Ida6b39d713cc119ad5a2f01fd54bfd252cf2c975
Reviewed-on: https://go-review.googlesource.com/c/go/+/303830
Trust: fannie zhang <Fannie.Zhang@arm.com>
Run-TryBot: fannie zhang <Fannie.Zhang@arm.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/ssa/gen/ARM64.rules
src/cmd/compile/internal/ssa/rewriteARM64.go
test/codegen/bitfield.go