]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.16] cmd/compile: fix ANDI/SRWI merge on ppc64
authorPaul E. Murphy <murp@ibm.com>
Thu, 15 Apr 2021 18:41:01 +0000 (13:41 -0500)
committerCarlos Amedee <carlos@golang.org>
Tue, 4 May 2021 15:18:16 +0000 (15:18 +0000)
commit7e709791c22409826cb267fced81f210f6aaaf09
treecec405d03287b3a7e89b6202acf6525278a944f2
parentea0537f2fc66d1f2616c24dcbf08da197cb8205d
[release-branch.go1.16] cmd/compile: fix ANDI/SRWI merge on ppc64

The shift amount should be masked to avoid rotation values
beyond the numer of bits. In this case, if the shift amount
is 0, it should rotate 0, not 32.

Fixes #45636

Change-Id: I1e764497a39d0ec128e29af42352b70c70b2ecc5
Reviewed-on: https://go-review.googlesource.com/c/go/+/310569
Run-TryBot: Paul Murphy <murp@ibm.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Carlos Eduardo Seo <carlos.seo@linaro.org>
Trust: Carlos Eduardo Seo <carlos.seo@linaro.org>
(cherry picked from commit c8fb0ec5a005289e9dd890b746e543b38bbd9528)
Reviewed-on: https://go-review.googlesource.com/c/go/+/311378
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
Trust: Lynn Boger <laboger@linux.vnet.ibm.com>
src/cmd/compile/internal/ssa/rewrite.go
src/cmd/compile/internal/ssa/rewrite_test.go