• Cherry Zhang's avatar
    cmd/compile: remove redundant constant shift rules · 7846500a
    Cherry Zhang authored
    Normal shift rules plus constant folding are enough to generate
    efficient shift-by-constant instructions.
    
    Add test to make sure we don't generate comparisons for constant
    shifts.
    
    TODO: there are still constant shift rules on PPC64. If they
    are removed, the constant folding rules are not enough to remove
    all the test and mask stuff for constant shifts. Leave them in
    for now.
    
    Fixes #20663.
    
    Change-Id: I724cc324aa8607762d0c8aacf9bfa641bda5c2a1
    Reviewed-on: https://go-review.googlesource.com/60330
    Run-TryBot: Cherry Zhang <cherryyz@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarKeith Randall <khr@golang.org>
    7846500a
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...