From: Jorropo Date: Wed, 26 Nov 2025 08:49:50 +0000 (+0100) Subject: cmd/compile: add tests bruteforcing limit complement X-Git-Tag: go1.26rc1~86 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=37ce4adcd4;p=gostls13.git cmd/compile: add tests bruteforcing limit complement Change-Id: I9d8bd78a06738a8a242b6965382e61568e93dea7 Reviewed-on: https://go-review.googlesource.com/c/go/+/724620 Auto-Submit: Jorropo Reviewed-by: Keith Randall LUCI-TryBot-Result: Go LUCI Reviewed-by: Cherry Mui Reviewed-by: Keith Randall --- diff --git a/src/cmd/compile/internal/ssa/prove_test.go b/src/cmd/compile/internal/ssa/prove_test.go index 0044b60a16..6315049870 100644 --- a/src/cmd/compile/internal/ssa/prove_test.go +++ b/src/cmd/compile/internal/ssa/prove_test.go @@ -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 }) +}