From: Jorropo Date: Sun, 7 Dec 2025 03:08:28 +0000 (+0100) Subject: cmd/compile: cleanup noLimit in prove X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=8f739162e6479e98b0950ac9dc2f69cd79031be2;p=gostls13.git cmd/compile: cleanup noLimit in prove - make it immutable - calculate it rather than using hardcoded value (it all is inlined and constant folded away into noLimit's callers) Change-Id: Ica12442df4d03e99123e62c0fe561c1078e35d75 Reviewed-on: https://go-review.googlesource.com/c/go/+/727181 Auto-Submit: Jorropo Reviewed-by: Keith Randall Reviewed-by: Keith Randall Reviewed-by: Carlos Amedee LUCI-TryBot-Result: Go LUCI --- diff --git a/src/cmd/compile/internal/ssa/prove.go b/src/cmd/compile/internal/ssa/prove.go index 3de964f061..c9f75daa67 100644 --- a/src/cmd/compile/internal/ssa/prove.go +++ b/src/cmd/compile/internal/ssa/prove.go @@ -250,6 +250,10 @@ func fitsInBitsU(x uint64, b uint) bool { return x>>b == 0 } +func noLimit() limit { + return noLimitForBitsize(64) +} + func noLimitForBitsize(bitsize uint) limit { return limit{min: -(1 << (bitsize - 1)), max: 1<<(bitsize-1) - 1, umin: 0, umax: 1< 0 { lim = lim.unsignedMin(a.umin / b.umax) }