]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: use proper magnitude for (x>>c) & uppermask = 0
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Mon, 20 Apr 2020 20:47:02 +0000 (03:47 +0700)
committerCuong Manh Le <cuong.manhle.vn@gmail.com>
Tue, 21 Apr 2020 03:45:26 +0000 (03:45 +0000)
commit7f8fda3c0bfcc832934aa75b4580b4c780e1cb52
tree2dc5b6cbc36e8a0a1ac0e2ffb1e523e1695d754a
parent0f14c2a0423ed2416db38ca24edfcb47f46c4e4c
cmd/compile: use proper magnitude for (x>>c) & uppermask = 0

This is followup of CL 228860, which rewrite shift rules to use typed
aux. That CL introduced nlz* functions, to refactor left shift rules.
While at it, we realize there's a bug in old rules with both right/left
shift rules, but only fix for left shift rules only.

This CL fixes the bug for right shift rules.

Passes toolstash-check.

Change-Id: Id8f2158b1b66c9e87f3fdeaa7ae3e35dc0666f8b
Reviewed-on: https://go-review.googlesource.com/c/go/+/229137
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/gen/generic.rules
src/cmd/compile/internal/ssa/rewritegeneric.go