• Austin Clements's avatar
    cmd/compile: teach prove about relations between constants · 8d8f620f
    Austin Clements authored
    Currently, we never add a relation between two constants to prove's
    fact table because these are eliminated before prove runs, so it
    currently doesn't handle facts like this very well even though they're
    easy to prove.
    
    We're about to start asserting some conditions that don't appear in
    the SSA, but are constructed from existing SSA values that may both be
    constants.
    
    Hence, improve the fact table to understand relations between
    constants by initializing the constant bounds of constant values to
    the value itself, rather than noLimit.
    
    Passes toolstash -cmp.
    
    Change-Id: I71f8dc294e59f19433feab1c10b6d3c99b7f1e26
    Reviewed-on: https://go-review.googlesource.com/102601
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarDavid Chase <drchase@google.com>
    8d8f620f
prove.go 29.8 KB