-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Open
Labels
FixPendingIssues that have a fix which has not yet been reviewed or submitted.Issues that have a fix which has not yet been reviewed or submitted.ImplementationIssues describing a semantics-preserving change to the Go implementation.Issues describing a semantics-preserving change to the Go implementation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Milestone
Description
Go version
go version go1.26-devel_e88be8a Sun Nov 23 09:07:32 2025 -0800 linux/amd64
Output of go env in your module/workspace:
Workspace is `go.godbolt.org` on `x86-64 gc (tip)` as above.What did you do?
[Code+output tested here]
Compile this simplified example:
var someError error
func f(w bool) (int, int, int, error) {
if w {
return 0, 0, 0, someError
}
return 1, 2, 1, nil
}What did you see happen?
The output for 0, 0, 0 above uses XORL and two MOVQ:
XORL AX, AX
MOVQ AX, BX
MOVQ AX, CXWhat did you expect to see?
All zeroing of registers here should use XORL.
Metadata
Metadata
Assignees
Labels
FixPendingIssues that have a fix which has not yet been reviewed or submitted.Issues that have a fix which has not yet been reviewed or submitted.ImplementationIssues describing a semantics-preserving change to the Go implementation.Issues describing a semantics-preserving change to the Go implementation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.