]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: remove more extension ops when not needed
authorKeith Randall <khr@golang.org>
Mon, 21 Aug 2023 17:03:07 +0000 (10:03 -0700)
committerKeith Randall <khr@golang.org>
Mon, 21 Aug 2023 20:52:15 +0000 (20:52 +0000)
commit0b47b94a6275b0d0830e5ce7a03aaa99430f7f76
tree1602dd02a1679eb7e7f2822c60b784a532fef636
parenta9bedc36a53f9d4ff6ab1c1a43c900c2fc8eba84
cmd/compile: remove more extension ops when not needed

If we're not using the upper bits, don't bother issuing a
sign/zero extension operation.

For arm64, after CL 520916 which fixed a correctness bug with
extensions but as a side effect leaves many unnecessary ones
still in place.

Change-Id: I5f4fe4efbf2e9f80969ab5b9a6122fb812dc2ec0
Reviewed-on: https://go-review.googlesource.com/c/go/+/521496
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/compile/internal/ssa/_gen/ARM64.rules
src/cmd/compile/internal/ssa/rewriteARM64.go
test/codegen/noextend.go