Skip to content

Commit a5bda58

Browse files
Jorropogopherbot
authored andcommitted
cmd/compile: run fmt on ssa
prove.go used to make my editor and precomit checks very unhappy. Change-Id: I25f7ffa2191480bc1b4f91fa91ccf3e4768045fa Reviewed-on: https://go-review.googlesource.com/c/go/+/685818 Reviewed-by: Carlos Amedee <[email protected]> Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Keith Randall <[email protected]> Auto-Submit: Keith Randall <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent 86b5ba7 commit a5bda58

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/cmd/compile/internal/ssa/prove.go

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1917,15 +1917,22 @@ func (ft *factsTable) flowLimit(v *Value) bool {
19171917

19181918
// See if we can get any facts because v is the result of signed mod by a constant.
19191919
// The mod operation has already been rewritten, so we have to try and reconstruct it.
1920-
// x % d
1920+
//
1921+
// x % d
1922+
//
19211923
// is rewritten as
1922-
// x - (x / d) * d
1924+
//
1925+
// x - (x / d) * d
1926+
//
19231927
// furthermore, the divide itself gets rewritten. If d is a power of 2 (d == 1<<k), we do
1924-
// (x / d) * d = ((x + adj) >> k) << k
1925-
// = (x + adj) & (-1<<k)
1928+
//
1929+
// (x / d) * d = ((x + adj) >> k) << k
1930+
// = (x + adj) & (-1<<k)
1931+
//
19261932
// with adj being an adjustment in case x is negative (see below).
19271933
// if d is not a power of 2, we do
1928-
// x / d = ... TODO ...
1934+
//
1935+
// x / d = ... TODO ...
19291936
func (ft *factsTable) detectSignedMod(v *Value) bool {
19301937
if ft.detectSignedModByPowerOfTwo(v) {
19311938
return true

0 commit comments

Comments
 (0)