]> Cypherpunks.ru repositories - gostls13.git/commit
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 Eduardo Seo <carlos.seo@linaro.org>
Thu, 15 Apr 2021 21:57:02 +0000 (21:57 +0000)
commitc8fb0ec5a005289e9dd890b746e543b38bbd9528
tree450d7c07296077a9072e6529992ce146009672c1
parent699a7c0fe9c1b75340f2ef05949529ec4b43dc4e
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 #45589

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>
src/cmd/compile/internal/ssa/rewrite.go
src/cmd/compile/internal/ssa/rewrite_test.go