File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
src/cmd/compile/internal/ssa Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -1917,15 +1917,22 @@ func (ft *factsTable) flowLimit(v *Value) bool {
1917
1917
1918
1918
// See if we can get any facts because v is the result of signed mod by a constant.
1919
1919
// The mod operation has already been rewritten, so we have to try and reconstruct it.
1920
- // x % d
1920
+ //
1921
+ // x % d
1922
+ //
1921
1923
// is rewritten as
1922
- // x - (x / d) * d
1924
+ //
1925
+ // x - (x / d) * d
1926
+ //
1923
1927
// 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
+ //
1926
1932
// with adj being an adjustment in case x is negative (see below).
1927
1933
// if d is not a power of 2, we do
1928
- // x / d = ... TODO ...
1934
+ //
1935
+ // x / d = ... TODO ...
1929
1936
func (ft * factsTable ) detectSignedMod (v * Value ) bool {
1930
1937
if ft .detectSignedModByPowerOfTwo (v ) {
1931
1938
return true
You can’t perform that action at this time.
0 commit comments