]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: merge zero/sign extensions with UBFX/SBFX on arm64
authorfanzha02 <fannie.zhang@arm.com>
Mon, 6 Sep 2021 03:06:16 +0000 (11:06 +0800)
committerfannie zhang <Fannie.Zhang@arm.com>
Mon, 6 Sep 2021 03:31:43 +0000 (03:31 +0000)
commit43b05173a219e19697c2f9c6d98cf4d8667b7ca5
treee9f2a0d4c0ff286bbb50ce369902d77496586c87
parent7619a4528d506277f44e8d4b70366b5b5633b40f
cmd/compile: merge zero/sign extensions with UBFX/SBFX on arm64

The UBFX and SBFX already zero/sign extend the result. Further
zero/sign extensions are thus unnecessary as long as they leave
the top bits unaltered. This patch absorbs zero/sign extensions
into UBFX/SBFX.

Add the related test cases.

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