Commit 419e6f08 authored by Keith Randall's avatar Keith Randall Committed by Andrew Bonventre
Browse files

[release-branch.go1.10] cmd/compile: fix constant folding of right shifts

The sub-word shifts need to sign-extend before shifting, to avoid
bringing in data from higher in the argument.

Fixes #23812

Change-Id: I0a95a0b49c48f3b40b85765bb4a9bb492be0cd73
Reviewed-on: https://go-review.googlesource.com/93716


Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
(cherry picked from commit 755b36aa)
Reviewed-on: https://go-review.googlesource.com/94215


Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 4c4ce3dc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment