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: sign extension wrong for paired 32-bit loads on arm64 #71759

Closed
randall77 opened this issue Feb 15, 2025 · 3 comments
Closed

cmd/compile: sign extension wrong for paired 32-bit loads on arm64 #71759

randall77 opened this issue Feb 15, 2025 · 3 comments
Labels
arch-arm64 BugReport Issues describing a possible bug in the Go implementation. compiler/runtime Issues related to the Go compiler and/or runtime. FixPending Issues that have a fix which has not yet been reviewed or submitted. NeedsFix The path to resolution is known, but the work has not been done. Soon This needs action soon. (recent regressions, service outages, unusual time-sensitive situations)
Milestone

Comments

@randall77
Copy link
Contributor

randall77 commented Feb 15, 2025

package main

//go:noinline                                                                                                                                                                            
func f(p *[2]int32) (int64, int64) {
        return int64(p[0]), int64(p[1])
}

func main() {
	p := [2]int32{-1, -1}
	x, y :=	f(&p)
	println(x, y)
}

Should print -1 -1. At tip it produces 4294967295 4294967295.

This is a bug in the recent CL 629256.

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Feb 15, 2025
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/649895 mentions this issue: cmd/compile: fix sign extension of paired 32-bit loads on arm64

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. FixPending Issues that have a fix which has not yet been reviewed or submitted. labels Feb 15, 2025
@dmitshur dmitshur added this to the Go1.25 milestone Feb 15, 2025
@gabyhelp gabyhelp added the BugReport Issues describing a possible bug in the Go implementation. label Feb 15, 2025
@gabyhelp
Copy link

Related Code Changes

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

@dmitshur dmitshur added the Soon This needs action soon. (recent regressions, service outages, unusual time-sensitive situations) label Feb 15, 2025
@sultan60011

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-arm64 BugReport Issues describing a possible bug in the Go implementation. compiler/runtime Issues related to the Go compiler and/or runtime. FixPending Issues that have a fix which has not yet been reviewed or submitted. NeedsFix The path to resolution is known, but the work has not been done. Soon This needs action soon. (recent regressions, service outages, unusual time-sensitive situations)
Projects
None yet
Development

No branches or pull requests

5 participants