• Giovanni Bajo's avatar
    cmd/compile: in prove, complete support for OpIsInBounds/OpIsSliceInBounds · ac43de3a
    Giovanni Bajo authored
    The logic in addBranchRestrictions didn't allow to correctly
    model OpIs(Slice)Bound for signed domain, and it was also partly
    implemented within addRestrictions.
    
    Thanks to the previous changes, it is now possible to handle
    the negative conditions correctly, so that we can learn
    both signed/LT + unsigned/LT on the positive side, and
    signed/GE + unsigned/GE on the negative side (but only if
    the index can be proved to be non-negative).
    
    This is able to prove ~50 more slice accesses in std+cmd.
    
    Change-Id: I9858080dc03b16f85993a55983dbc4b00f8491b0
    Reviewed-on: https://go-review.googlesource.com/104037
    Run-TryBot: Giovanni Bajo <rasky@develer.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarAustin Clements <austin@google.com>
    ac43de3a
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...