]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: add tests bruteforcing limit complement
authorJorropo <jorropo.pgm@gmail.com>
Wed, 26 Nov 2025 08:49:50 +0000 (09:49 +0100)
committerGopher Robot <gobot@golang.org>
Wed, 26 Nov 2025 18:19:21 +0000 (10:19 -0800)
Change-Id: I9d8bd78a06738a8a242b6965382e61568e93dea7
Reviewed-on: https://go-review.googlesource.com/c/go/+/724620
Auto-Submit: Jorropo <jorropo.pgm@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@google.com>
src/cmd/compile/internal/ssa/prove_test.go

index 0044b60a16f01b173e6d1051e3f483714579d591..6315049870aa59ed0ccb85cd0ed1af88d8619ea7 100644 (file)
@@ -67,3 +67,10 @@ func TestLimitNegSigned(t *testing.T) {
 func TestLimitNegUnsigned(t *testing.T) {
        testLimitUnaryOpUnsigned8(t, "neg", limit.neg, func(x uint8) uint8 { return -x })
 }
+
+func TestLimitComSigned(t *testing.T) {
+       testLimitUnaryOpSigned8(t, "com", limit.com, func(x int8) int8 { return ^x })
+}
+func TestLimitComUnsigned(t *testing.T) {
+       testLimitUnaryOpUnsigned8(t, "com", limit.com, func(x uint8) uint8 { return ^x })
+}