cmd/compile: clarify division bounds check optimization

The name of the function should mention division.
Eliminate double negatives from the comment describing it.

Change-Id: Icef1a5139b3a91b86acb930af97938f5160f7342
Reviewed-on: https://go-review.googlesource.com/c/go/+/217001
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
This commit is contained in:
Josh Bleecher Snyder 2020-01-23 22:18:30 -08:00
parent e932f0addc
commit 1b47fde55c
4 changed files with 9 additions and 7 deletions

View file

@ -257,7 +257,7 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
// CPU faults upon signed overflow, which occurs when the most
// negative int is divided by -1. Handle divide by -1 as a special case.
if ssa.NeedsFixUp(v) {
if ssa.DivisionNeedsFixUp(v) {
var c *obj.Prog
switch v.Op {
case ssa.OpAMD64DIVQ: