Skip to content
Snippets Groups Projects
Commit 51f508bb authored by Michael Munday's avatar Michael Munday Committed by Chris Broadfoot
Browse files

[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/40931


Reviewed-by: default avatarBrad 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/43994


Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 243dee17
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment