aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/test
diff options
context:
space:
mode:
authorJes Cok <xigua67damn@gmail.com>2025-10-19 19:53:27 +0000
committerGopher Robot <gobot@golang.org>2025-10-21 08:13:08 -0700
commita5a249d6a64508376320bc48546a6a43aebecda7 (patch)
tree707720726df7c69b68536f55154a5fb0c2704763 /src/cmd/compile/internal/test
parent694182d77b1a0e3676214ad0e361bdbdafde33a1 (diff)
downloadgo-a5a249d6a64508376320bc48546a6a43aebecda7.tar.xz
all: eliminate unnecessary type conversions
Found by github.com/mdempsky/unconvert Change-Id: I88ce10390a49ba768a4deaa0df9057c93c1164de GitHub-Last-Rev: 3b0f7e8f74f58340637f33287c238765856b2483 GitHub-Pull-Request: golang/go#75974 Reviewed-on: https://go-review.googlesource.com/c/go/+/712940 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/cmd/compile/internal/test')
-rw-r--r--src/cmd/compile/internal/test/divconst_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/compile/internal/test/divconst_test.go b/src/cmd/compile/internal/test/divconst_test.go
index 9358a60374..5e89ce9a3d 100644
--- a/src/cmd/compile/internal/test/divconst_test.go
+++ b/src/cmd/compile/internal/test/divconst_test.go
@@ -99,28 +99,28 @@ func BenchmarkDivconstU64(b *testing.B) {
x := uint64(123456789123456789)
for i := 0; i < b.N; i++ {
x += x << 4
- u64res = uint64(x) / 3
+ u64res = x / 3
}
})
b.Run("5", func(b *testing.B) {
x := uint64(123456789123456789)
for i := 0; i < b.N; i++ {
x += x << 4
- u64res = uint64(x) / 5
+ u64res = x / 5
}
})
b.Run("37", func(b *testing.B) {
x := uint64(123456789123456789)
for i := 0; i < b.N; i++ {
x += x << 4
- u64res = uint64(x) / 37
+ u64res = x / 37
}
})
b.Run("1234567", func(b *testing.B) {
x := uint64(123456789123456789)
for i := 0; i < b.N; i++ {
x += x << 4
- u64res = uint64(x) / 1234567
+ u64res = x / 1234567
}
})
}