• Austin Clements's avatar
    cmd/compile: simplify limit logic in prove · 2e9cf5f6
    Austin Clements authored
    This replaces the open-coded intersection of limits in the prove pass
    with a general limit intersection operation. This should get identical
    results except in one case where it's more precise: when handling an
    equality relation, if the value is *outside* the existing range, this
    will reduce the range to empty rather than resetting it. This will be
    important to a follow-up CL where we can take advantage of empty
    ranges.
    
    For #23354.
    
    Change-Id: I3d3d75924f61b1da1cb604b3a9d189b26fb3a14e
    Reviewed-on: https://go-review.googlesource.com/87477
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarKeith Randall <khr@golang.org>
    Reviewed-by: default avatarAlexandru Moșoi <alexandru@mosoi.ro>
    2e9cf5f6
prove.go 19.5 KB