[release-branch.go1.8] cmd/compile: fix s390x unsigned comparison constant merging rules
On s390x unsigned integer comparisons with immediates require the immediate to be an unsigned 32-bit integer. The rule was checking that the immediate was a signed 32-bit integer. This CL also adds a test for comparisons that could be turned into compare with immediate or equivalent instructions (depending on architecture and optimizations applied). Cherry-pick of CL 40433 and CL 40873. Fixes #19940. Reviewed-on: https://go-review.googlesource.com/40931Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Change-Id: I3daaeaa40d7637bd4421e6b8d37ea4ffd74448ce Reviewed-on: https://go-review.googlesource.com/43994Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Showing
This source diff could not be displayed because it is too large. You can view the blob instead.
Please register or sign in to comment