cmd/compile: remove redundant constant shift rules
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: Keith Randall <khr@golang.org>
Showing
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment