summaryrefslogtreecommitdiff
path: root/test/codegen/arithmetic.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2019-04-23 20:49:05 +0000
committerKeith Randall <khr@golang.org>2019-04-23 21:23:18 +0000
commit17615969b6c910972a4babb4d1c8f009b1d851e3 (patch)
tree0e44b1883f6f9d67a0e4eed071047b5385c8cec2 /test/codegen/arithmetic.go
parent58de7c6d4838729c6c133d9b2461dc6b1f766b76 (diff)
downloadgo-git-17615969b6c910972a4babb4d1c8f009b1d851e3.tar.gz
Revert "cmd/compile: add signed divisibility by power of 2 rules"
This reverts CL 168038 (git 68819fb6d2bab59e4eadcdf62aa4a2a54417d640) Reason for revert: Doesn't work on 32 bit archs. Change-Id: Idec9098060dc65bc2f774c5383f0477f8eb63a3d Reviewed-on: https://go-review.googlesource.com/c/go/+/173442 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'test/codegen/arithmetic.go')
-rw-r--r--test/codegen/arithmetic.go11
1 files changed, 0 insertions, 11 deletions
diff --git a/test/codegen/arithmetic.go b/test/codegen/arithmetic.go
index 535e3349fc..b5976be9d2 100644
--- a/test/codegen/arithmetic.go
+++ b/test/codegen/arithmetic.go
@@ -185,17 +185,6 @@ func Pow2Mods(n1 uint, n2 int) (uint, int) {
return a, b
}
-// Check that signed divisibility checks get converted to AND on low bits
-func Pow2DivisibleSigned(n int) bool {
- // 386:"TESTL\t[$]63",-"DIVL"
- // amd64:"TESTQ\t[$]63",-"DIVQ"
- // arm:"AND\t[$]63",-".*udiv"
- // arm64:"AND\t[$]63",-"UDIV"
- // ppc64:"ANDCC\t[$]63"
- // ppc64le:"ANDCC\t[$]63"
- return n%64 == 0 // signed
-}
-
// Check that constant modulo divs get turned into MULs
func ConstMods(n1 uint, n2 int) (uint, int) {
// amd64:"MOVQ\t[$]-1085102592571150095","MULQ",-"DIVQ"