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: 16 bit-width, short branch too far ICE on loong64 #61819

Closed
ALTree opened this issue Aug 7, 2023 · 2 comments
Closed

cmd/compile: 16 bit-width, short branch too far ICE on loong64 #61819

ALTree opened this issue Aug 7, 2023 · 2 comments
Assignees
Labels
arch-loong64 Issues solely affecting the loongson architecture. compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@ALTree
Copy link
Member

ALTree commented Aug 7, 2023

$ gotip version
go version devel go1.22-088f953 Mon Aug 7 06:58:18 2023 +0000 linux/amd64

The (unreasonably) big function linked at the bottom of this post triggers an internal compiler error when built for GOARCH=loong64:

$ GOARCH=loong64 gotip build crash.go 

# command-line-arguments
./crash.go:22:5: 16 bit-width, short branch too far
00800 (/home/alberto/crash.go:57)	BLTZ	R4, 131880

Doesn't crash the compiler on other GOARCHs.

Full reproducer on gist.gihub.com.

cc @golang/loong64

@ALTree ALTree added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. arch-loong64 Issues solely affecting the loongson architecture. labels Aug 7, 2023
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Aug 7, 2023
@ALTree ALTree changed the title cmd/compile: 16 bit-width, short branch too far on loong64 cmd/compile: 16 bit-width, short branch too far ICE on loong64 Aug 7, 2023
@abner-chenc
Copy link
Contributor

Thank you very much for reporting this bug, I have reproduced the bug and fixed it; I am doing local testing, and I will submit the fixed patch as soon as possible.

@mknyszek mknyszek added this to the Backlog milestone Aug 9, 2023
@gopherbot
Copy link

Change https://go.dev/cl/519915 mentions this issue: cmd/internal/obj/loong64: recheck jump offset boundary after auto-aligning loop heads

@abner-chenc abner-chenc modified the milestones: Backlog, Go1.22 Oct 25, 2023
@gopherbot gopherbot modified the milestones: Go1.22, Go1.23 Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-loong64 Issues solely affecting the loongson architecture. compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
Development

No branches or pull requests

4 participants