Rather than handling shift based scaling in two locations, rework logic
so there is a single exit path.
Change-Id: I832b4932d53183736050059a11019ced08281b3b
Reviewed-on: https://go-review.googlesource.com/c/go/+/523455 Reviewed-by: M Zhuo <mzh@golangcn.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Joel Sing <joel@sing.id.au> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Mark Ryan <markdryan@rivosinc.com>
TryBot-Result: Gopher Robot <gobot@golang.org>