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: MOVWreg missing sign-extension following a Copy from a floating-point LoadReg [1.16 backport] #50682

Closed
gopherbot opened this issue Jan 19, 2022 · 3 comments
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link

@bcmills requested issue #50671 to be considered for backport to the next 1.16 minor release.

@gopherbot, please backport to Go 1.16 and Go 1.17. This is a compiler bug that causes subtle run-time data corruption; it is hard to predict which code might be affected, and the corrupted paths might not be triggered by tests, but it appears to cause a nonzero rate of failures in the Go builders. The fix is small and MIPS-specific, so backporting it seems low-risk.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Jan 19, 2022
@gopherbot gopherbot added this to the Go1.16.14 milestone Jan 19, 2022
@toothrot toothrot added the CherryPickApproved Used during the release process for point releases label Jan 19, 2022
@toothrot
Copy link
Contributor

This generates the wrong code and the fix is low risk. Approved.

@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Jan 19, 2022
@gopherbot
Copy link
Author

Change https://golang.org/cl/379515 mentions this issue: [release-branch.go1.16] cmd/compile: don't elide extension for LoadReg to FP register on MIPS64

@gopherbot
Copy link
Author

Closed by merging fcd482a to release-branch.go1.16.

gopherbot pushed a commit that referenced this issue Feb 7, 2022
…g to FP register on MIPS64

For an extension operation like MOVWreg, if the operand is already
extended, we optimize the second extension out. Usually a LoadReg
of a proper type would come already extended, as a MOVW/MOVWU etc.
instruction does. But for a LoadReg to a floating point register,
the instruction does not do the extension. So we cannot elide the
extension.

Updates #50671.
Fixes #50682.

Change-Id: Id8991df78d5acdecd3fd6138c558428cbd5f6ba3
Reviewed-on: https://go-review.googlesource.com/c/go/+/379236
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
(cherry picked from commit d93ff73)
Reviewed-on: https://go-review.googlesource.com/c/go/+/379515
@golang golang locked and limited conversation to collaborators Feb 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

2 participants