diff options
| author | Alberto Donizetti <alb.donizetti@gmail.com> | 2020-10-29 12:12:19 +0100 |
|---|---|---|
| committer | Alberto Donizetti <alb.donizetti@gmail.com> | 2020-10-29 15:11:47 +0000 |
| commit | ecb79e8afa7811fd23b2e550a2bc5b22ea0aa82d (patch) | |
| tree | 499eeed1085fd1db1c4954e70e19e6df7619d530 | |
| parent | c45d78013f92a29285cd81488eb7a16819f01e18 (diff) | |
| download | go-ecb79e8afa7811fd23b2e550a2bc5b22ea0aa82d.tar.xz | |
cmd/compile: run rulegen to include missing condition
Rulegen was not run again between patchsets 2 and 3 of CL 264683, so
the rewritegeneric.go file is out of sync. Run rulegen.
Change-Id: I67d8d267c4f666943ed9bf8c33aac2ac6013336a
Reviewed-on: https://go-review.googlesource.com/c/go/+/266080
Trust: Alberto Donizetti <alb.donizetti@gmail.com>
Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rémy Oudompheng <remyoudompheng@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
| -rw-r--r-- | src/cmd/compile/internal/ssa/rewritegeneric.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/ssa/rewritegeneric.go b/src/cmd/compile/internal/ssa/rewritegeneric.go index 0d25c76abf..c9b8f70424 100644 --- a/src/cmd/compile/internal/ssa/rewritegeneric.go +++ b/src/cmd/compile/internal/ssa/rewritegeneric.go @@ -5208,7 +5208,7 @@ func rewriteValuegeneric_OpDiv64u(v *Value) bool { return true } // match: (Div64u x (Const64 [c])) - // cond: c > 0 && c <= 0xFFFF && umagicOK32(int32(c)) && config.RegSize == 4 + // cond: c > 0 && c <= 0xFFFF && umagicOK32(int32(c)) && config.RegSize == 4 && config.useHmul // result: (Add64 (Add64 <typ.UInt64> (Add64 <typ.UInt64> (Lsh64x64 <typ.UInt64> (ZeroExt32to64 (Div32u <typ.UInt32> (Trunc64to32 <typ.UInt32> (Rsh64Ux64 <typ.UInt64> x (Const64 <typ.UInt64> [32]))) (Const32 <typ.UInt32> [int32(c)]))) (Const64 <typ.UInt64> [32])) (ZeroExt32to64 (Div32u <typ.UInt32> (Trunc64to32 <typ.UInt32> x) (Const32 <typ.UInt32> [int32(c)])))) (Mul64 <typ.UInt64> (ZeroExt32to64 <typ.UInt64> (Mod32u <typ.UInt32> (Trunc64to32 <typ.UInt32> (Rsh64Ux64 <typ.UInt64> x (Const64 <typ.UInt64> [32]))) (Const32 <typ.UInt32> [int32(c)]))) (Const64 <typ.UInt64> [int64((1<<32)/c)]))) (ZeroExt32to64 (Div32u <typ.UInt32> (Add32 <typ.UInt32> (Mod32u <typ.UInt32> (Trunc64to32 <typ.UInt32> x) (Const32 <typ.UInt32> [int32(c)])) (Mul32 <typ.UInt32> (Mod32u <typ.UInt32> (Trunc64to32 <typ.UInt32> (Rsh64Ux64 <typ.UInt64> x (Const64 <typ.UInt64> [32]))) (Const32 <typ.UInt32> [int32(c)])) (Const32 <typ.UInt32> [int32((1<<32)%c)]))) (Const32 <typ.UInt32> [int32(c)])))) for { x := v_0 @@ -5216,7 +5216,7 @@ func rewriteValuegeneric_OpDiv64u(v *Value) bool { break } c := auxIntToInt64(v_1.AuxInt) - if !(c > 0 && c <= 0xFFFF && umagicOK32(int32(c)) && config.RegSize == 4) { + if !(c > 0 && c <= 0xFFFF && umagicOK32(int32(c)) && config.RegSize == 4 && config.useHmul) { break } v.reset(OpAdd64) |
