From 17615969b6c910972a4babb4d1c8f009b1d851e3 Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Tue, 23 Apr 2019 20:49:05 +0000 Subject: 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 --- test/codegen/arithmetic.go | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'test/codegen/arithmetic.go') 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" -- cgit v1.2.1