Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: ppc64le: sign extension issue in go 1.21rc2 [1.19 backport] #61319

Closed
gopherbot opened this issue Jul 12, 2023 · 2 comments
Closed
Labels
arch-ppc64x CherryPickApproved Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link
Contributor

@pmur requested issue #61297 to be considered for backport to the next 1.19 minor release.

@gopherbot please consider a backport for 1.20 and 1.19, this is a compiler bug without a workaround.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Jul 12, 2023
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 12, 2023
@gopherbot gopherbot added this to the Go1.19.12 milestone Jul 12, 2023
@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/509018 mentions this issue: [release-branch.go1.19] cmd/compile: on PPC64, fix sign/zero extension when masking

@heschi heschi added the CherryPickApproved Used during the release process for point releases label Jul 19, 2023
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Jul 19, 2023
@gopherbot
Copy link
Contributor Author

Closed by merging 6ce543d to release-branch.go1.19.

gopherbot pushed a commit that referenced this issue Jul 19, 2023
…n when masking

This backport required manual cleanup as go1.20 combined the
ANDCCconst and ANDconst opcodes into one. Similarly, CL 456736
introduced a suble bug by using (Select1 (ANDCCconst ...)). This
usually worked because the same rule quietly changes the type
of the newly created ANDCCconst to a tuple. This change exposed
the bug, so fix it too.

(ANDconst [y] (MOV.*reg x)) should only be merged when zero
extending. Otherwise, sign bits are lost on negative values.

(ANDconst [0xFF] (MOVBreg x)) should be simplified to a zero
extension of x. Likewise for the MOVHreg variant.

Fixes #61319

Change-Id: I04e4fd7dc6a826e870681f37506620d48393698b
Reviewed-on: https://go-review.googlesource.com/c/go/+/508775
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Paul Murphy <murp@ibm.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/509018
Auto-Submit: Heschi Kreinick <heschi@google.com>
TryBot-Bypass: Heschi Kreinick <heschi@google.com>
@golang golang locked and limited conversation to collaborators Jul 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-ppc64x CherryPickApproved Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

3 participants