• Josh Bleecher Snyder's avatar
    cmd/compile: add minor bit twiddling optimizations · 00db0cbf
    Josh Bleecher Snyder authored
    Noticed while adding to the bitset implementation
    in cmd/compile/internal/gc.
    
    The (Com (Const)) optimizations were already present
    in the AMD64 lowered optimizations.
    They trigger 118, 44, 262, and 108 times
    respectively for int sizes 8, 16, 32, and 64
    in a run of make.bash.
    
    The (Or (And)) optimization is new.
    It triggers 3 times for int size 8
    and once for int size 64 during make.bash,
    in packages internal/poll, reflect,
    encoding/asn1, and go/types,
    so there is a bit of natural test coverage.
    
    Change-Id: I44072864ff88831d5ec7dce37c516d29df056e98
    Reviewed-on: https://go-review.googlesource.com/41758
    Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarKeith Randall <khr@golang.org>
    00db0cbf
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...