Skip to content

s390x target seems got slow after update of LLVM. #23557

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

Closed
HomuHomu833 opened this issue Apr 12, 2025 · 11 comments
Closed

s390x target seems got slow after update of LLVM. #23557

HomuHomu833 opened this issue Apr 12, 2025 · 11 comments
Labels
arch-s390x 64-bit IBM z/Architecture backend-llvm The LLVM backend outputs an LLVM IR Module. bug Observed behavior contradicts documented or intended behavior upstream An issue with a third party project that Zig uses.
Milestone

Comments

@HomuHomu833
Copy link

Zig Version

0.15.0-dev.263+d8153fa74

Steps to Reproduce and Observed Behavior

As you can see in this run, I made two attempts but hit the GitHub Actions runner limit. However, after downgrading to 0.15.0-dev.137+db7db4802, it compiled fine again. Really strange.

Expected Behavior

New Zig to build faster maybe? idrk

@HomuHomu833 HomuHomu833 added the bug Observed behavior contradicts documented or intended behavior label Apr 12, 2025
@HomuHomu833
Copy link
Author

oh, that also kind of includes hexagon; it's as slow as s390x.

@alexrp
Copy link
Member

alexrp commented Apr 12, 2025

You're probably hitting: llvm/llvm-project#134714

oh, that also kind of includes hexagon; it's as slow as s390x.

I don't follow; where does Hexagon fit into this?

@alexrp alexrp added arch-s390x 64-bit IBM z/Architecture upstream An issue with a third party project that Zig uses. backend-llvm The LLVM backend outputs an LLVM IR Module. labels Apr 12, 2025
@alexrp alexrp added this to the 0.15.0 milestone Apr 12, 2025
@HomuHomu833
Copy link
Author

HomuHomu833 commented Apr 12, 2025

I don't follow; where does Hexagon fit into this?

I don't really know, just to make sure I'll run second time and see if that happens again.

@alexrp
Copy link
Member

alexrp commented Apr 13, 2025

Oh, you're actually trying to build it. Don't bother with that; timeouts aside, there is a bug on the LLVM side that isn't likely to be fixed until LLVM 21, and which prevents building large binaries like zig. The Zig standard library also hasn't been completely ported and tested yet.

@HomuHomu833
Copy link
Author

mkay

@HomuHomu833
Copy link
Author

@alexrp lil update I compiled through WSL2 and got relocation error ouch

ld.lld: error: lib/libLLVMInstCombine.a(InstCombineVectorOps.cpp.o):(function evaluateInDifferentElementOrder(llvm::Value*, llvm::ArrayRef<int>, llvm::IRBuilderBase&): .text._ZL31evaluateInDifferentElementOrderPN4llvm5ValueENS_8ArrayRefIiEERNS_13IRBuilderBaseE+0xd0c): relocation R_HEX_B22_PCREL out of range: 11479108 is not in [-8388608, 8388607]; references '__ubsan_handle_type_mismatch_v1'
>>> referenced by InstCombineVectorOps.cpp
>>> defined in /home/homura/.cache/zig/o/9fdb2db183d32c7be8cdd99605e4091c/libubsan_rt.a(/home/homura/.cache/zig/o/9fdb2db183d32c7be8cdd99605e4091c/libubsan_rt.a.o)

@HomuHomu833
Copy link
Author

maybe we need make seperate issue of this?

@alexrp
Copy link
Member

alexrp commented Apr 18, 2025

That is the Hexagon issue I was referring to: llvm/llvm-project#111217

@HomuHomu833
Copy link
Author

That is the Hexagon issue I was referring to: llvm/llvm-project#111217

oh okay didn't saw that pull request

@alexrp
Copy link
Member

alexrp commented May 15, 2025

The fix for this is in LLVM 20.1.5.

@alexrp alexrp closed this as completed May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-s390x 64-bit IBM z/Architecture backend-llvm The LLVM backend outputs an LLVM IR Module. bug Observed behavior contradicts documented or intended behavior upstream An issue with a third party project that Zig uses.
Projects
None yet
Development

No branches or pull requests

2 participants