cmd/6g, cmd/8g: simplify integer division code.
Change suggested by iant. The compiler generates special code for a/b when a is -0x80...0 and b = -1. A single instruction can cover the case where b is -1, so only one comparison is needed. Fixes #3551. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6922049
Showing
Please
register
or
sign in
to comment