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

recent bootstrap regression: arm-linux-musleabihf: LLVM ERROR: Do not know how to promote this operator's result! #21378

Closed
andrewrk opened this issue Sep 10, 2024 · 4 comments
Labels
arch-arm 32-bit ARM backend-llvm The LLVM backend outputs an LLVM IR Module. regression It worked in a previous version of Zig, but stopped working.
Milestone

Comments

@andrewrk
Copy link
Member

from https://github.com/ziglang/www.ziglang.org/actions/runs/10786724616

2024-09-10T18:04:54.9953484Z install
2024-09-10T18:04:54.9956392Z +- install zig
2024-09-10T18:04:54.9957321Z    +- zig build-exe zig ReleaseFast arm-linux-musleabihf failure
2024-09-10T18:04:54.9958962Z error: error(link): /home/ci/actions-runner/_work/zig-bootstrap/out/host/bin/zig terminated with stderr:
2024-09-10T18:04:54.9962705Z ld.lld: warning: Linking two modules of different target triples: '/home/ci/actions-runner/_work/zig-bootstrap/out/zig-local-cache/o/5e69a1fcdfd6c314e12fe76e1173b45b/zig.o' is 'arm-unknown-linux-musleabihf' whereas 'ld-temp.o' is 'armv6kz-unknown-linux-musleabihf'
2024-09-10T18:04:54.9965405Z 
2024-09-10T18:04:54.9966055Z LLVM ERROR: Do not know how to promote this operator's result!
2024-09-10T18:04:54.9966862Z 
2024-09-10T18:04:54.9967115Z error: LLDCrashed
2024-09-10T18:04:54.9967505Z 
2024-09-10T18:04:54.9973575Z error: the following command exited with error code 1:
2024-09-10T18:04:55.0000286Z /home/ci/actions-runner/_work/zig-bootstrap/out/host/bin/zig build-exe --stack 33554432 -cflags -std=c++17 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -fno-exceptions -fno-rtti -fno-stack-protector -fvisibility-inlines-hidden -Wno-type-limits -Wno-missing-braces -Wno-comment -DNDEBUG=1 -- /home/ci/actions-runner/_work/zig-bootstrap/zig/src/zig_llvm.cpp /home/ci/actions-runner/_work/zig-bootstrap/zig/src/zig_clang.cpp /home/ci/actions-runner/_work/zig-bootstrap/zig/src/zig_llvm-ar.cpp /home/ci/actions-runner/_work/zig-bootstrap/zig/src/zig_clang_driver.cpp /home/ci/actions-runner/_work/zig-bootstrap/zig/src/zig_clang_cc1_main.cpp /home/ci/actions-runner/_work/zig-bootstrap/zig/src/zig_clang_cc1as_main.cpp -lclangFrontendTool -lclangCodeGen -lclangFrontend -lclangDriver -lclangSerialization -lclangSema -lclangStaticAnalyzerFrontend -lclangStaticAnalyzerCheckers -lclangStaticAnalyzerCore -lclangAnalysis -lclangASTMatchers -lclangAST -lclangParse -lclangAPINotes -lclangBasic -lclangEdit -lclangLex -lclangARCMigrate -lclangRewriteFrontend -lclangRewrite -lclangCrossTU -lclangIndex -lclangToolingCore -lclangExtractAPI -lclangSupport -llldMinGW -llldELF -llldCOFF -llldWasm -llldMachO -llldCommon -lLLVMWindowsManifest -lLLVMXRay -lLLVMLibDriver -lLLVMDlltoolDriver -lLLVMTextAPIBinaryReader -lLLVMCoverage -lLLVMLineEditor -lLLVMXCoreDisassembler -lLLVMXCoreCodeGen -lLLVMXCoreDesc -lLLVMXCoreInfo -lLLVMX86TargetMCA -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMX86Desc -lLLVMX86Info -lLLVMWebAssemblyDisassembler -lLLVMWebAssemblyAsmParser -lLLVMWebAssemblyCodeGen -lLLVMWebAssemblyUtils -lLLVMWebAssemblyDesc -lLLVMWebAssemblyInfo -lLLVMVEDisassembler -lLLVMVEAsmParser -lLLVMVECodeGen -lLLVMVEDesc -lLLVMVEInfo -lLLVMSystemZDisassembler -lLLVMSystemZAsmParser -lLLVMSystemZCodeGen -lLLVMSystemZDesc -lLLVMSystemZInfo -lLLVMSparcDisassembler -lLLVMSparcAsmParser -lLLVMSparcCodeGen -lLLVMSparcDesc -lLLVMSparcInfo -lLLVMRISCVTargetMCA -lLLVMRISCVDisassembler -lLLVMRISCVAsmParser -lLLVMRISCVCodeGen -lLLVMRISCVDesc -lLLVMRISCVInfo -lLLVMPowerPCDisassembler -lLLVMPowerPCAsmParser -lLLVMPowerPCCodeGen -lLLVMPowerPCDesc -lLLVMPowerPCInfo -lLLVMNVPTXCodeGen -lLLVMNVPTXDesc -lLLVMNVPTXInfo -lLLVMMSP430Disassembler -lLLVMMSP430AsmParser -lLLVMMSP430CodeGen -lLLVMMSP430Desc -lLLVMMSP430Info -lLLVMMipsDisassembler -lLLVMMipsAsmParser -lLLVMMipsCodeGen -lLLVMMipsDesc -lLLVMMipsInfo -lLLVMLoongArchDisassembler -lLLVMLoongArchAsmParser -lLLVMLoongArchCodeGen -lLLVMLoongArchDesc -lLLVMLoongArchInfo -lLLVMLanaiDisassembler -lLLVMLanaiCodeGen -lLLVMLanaiAsmParser -lLLVMLanaiDesc -lLLVMLanaiInfo -lLLVMHexagonDisassembler -lLLVMHexagonCodeGen -lLLVMHexagonAsmParser -lLLVMHexagonDesc -lLLVMHexagonInfo -lLLVMBPFDisassembler -lLLVMBPFAsmParser -lLLVMBPFCodeGen -lLLVMBPFDesc -lLLVMBPFInfo -lLLVMAVRDisassembler -lLLVMAVRAsmParser -lLLVMAVRCodeGen -lLLVMAVRDesc -lLLVMAVRInfo -lLLVMARMDisassembler -lLLVMARMAsmParser -lLLVMARMCodeGen -lLLVMARMDesc -lLLVMARMUtils -lLLVMARMInfo -lLLVMAMDGPUTargetMCA -lLLVMAMDGPUDisassembler -lLLVMAMDGPUAsmParser -lLLVMAMDGPUCodeGen -lLLVMAMDGPUDesc -lLLVMAMDGPUUtils -lLLVMAMDGPUInfo -lLLVMAArch64Disassembler -lLLVMAArch64AsmParser -lLLVMAArch64CodeGen -lLLVMAArch64Desc -lLLVMAArch64Utils -lLLVMAArch64Info -lLLVMOrcDebugging -lLLVMOrcJIT -lLLVMWindowsDriver -lLLVMMCJIT -lLLVMJITLink -lLLVMInterpreter -lLLVMExecutionEngine -lLLVMRuntimeDyld -lLLVMOrcTargetProcess -lLLVMOrcShared -lLLVMDWP -lLLVMDebugInfoLogicalView -lLLVMDebugInfoGSYM -lLLVMOption -lLLVMObjectYAML -lLLVMObjCopy -lLLVMMCA -lLLVMMCDisassembler -lLLVMLTO -lLLVMPasses -lLLVMHipStdPar -lLLVMCFGuard -lLLVMCoroutines -lLLVMipo -lLLVMVectorize -lLLVMLinker -lLLVMInstrumentation -lLLVMFrontendOpenMP -lLLVMFrontendOffloading -lLLVMFrontendOpenACC -lLLVMFrontendHLSL -lLLVMFrontendDriver -lLLVMExtensions -lLLVMDWARFLinkerParallel -lLLVMDWARFLinkerClassic -lLLVMDWARFLinker -lLLVMGlobalISel -lLLVMMIRParser -lLLVMAsmPrinter -lLLVMSelectionDAG -lLLVMCodeGen -lLLVMTarget -lLLVMObjCARCOpts -lLLVMCodeGenTypes -lLLVMIRPrinter -lLLVMInterfaceStub -lLLVMFileCheck -lLLVMFuzzMutate -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMSymbolize -lLLVMDebugInfoBTF -lLLVMDebugInfoPDB -lLLVMDebugInfoMSF -lLLVMDebugInfoDWARF -lLLVMObject -lLLVMTextAPI -lLLVMMCParser -lLLVMIRReader -lLLVMAsmParser -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMBitReader -lLLVMFuzzerCLI -lLLVMCore -lLLVMRemarks -lLLVMBitstreamReader -lLLVMBinaryFormat -lLLVMTargetParser -lLLVMSupport -lLLVMDemangle -lz -lzstd -fstrip -fno-sanitize-thread -OReleaseFast -target arm-linux-musleabihf -mcpu generic+v7a --dep aro --dep aro_translate_c --dep build_options -Mroot=/home/ci/actions-runner/_work/zig-bootstrap/zig/src/main.zig -Maro=/home/ci/actions-runner/_work/zig-bootstrap/zig/lib/compiler/aro/aro.zig --dep aro -Maro_translate_c=/home/ci/actions-runner/_work/zig-bootstrap/zig/lib/compiler/aro_translate_c.zig -Mbuild_options=/home/ci/actions-runner/_work/zig-bootstrap/out/zig-local-cache/c/b24e958393226ebdae30503b60c0fb43/options.zig -lc++ -lc --cache-dir /home/ci/actions-runner/_work/zig-bootstrap/out/zig-local-cache --global-cache-dir /home/ci/actions-runner/_work/zig-bootstrap/out/zig-global-cache --name zig -L /home/ci/actions-runner/_work/zig-bootstrap/out/arm-linux-musleabihf-generic+v7a/lib -I /home/ci/actions-runner/_work/zig-bootstrap/out/arm-linux-musleabihf-generic+v7a/include --zig-lib-dir /home/ci/actions-runner/_work/zig-bootstrap/out/host/lib/zig/ --listen=- 

This is preventing the downloads page from updating.

cc @alexrp

@andrewrk andrewrk added arch-arm 32-bit ARM backend-llvm The LLVM backend outputs an LLVM IR Module. regression It worked in a previous version of Zig, but stopped working. labels Sep 10, 2024
@andrewrk andrewrk added this to the 0.14.0 milestone Sep 10, 2024
@jacobly0
Copy link
Member

jacobly0 commented Sep 10, 2024

Probably this. or not, some kind of float issue

@alexrp
Copy link
Contributor

alexrp commented Sep 11, 2024

I have not actually tried to bootstrap with that commit hash yet, but here's my 10-minute analysis just based on the information available:

The regression was introduced in #21344. This new Aro version added a whole bunch of f16 code that's now exercising features that weren't previously used during bootstrap. The problem is that LLVM has very poor f16 support for Armv7; it only really works properly with the floating-point features introduced in Armv8, or when using soft float. Our CI tests Armv8, not Armv7, but tarballs target Armv7. Incidentally, this kind of regression is exactly why I want us to switch to Armv7 in CI. 😉

The good news is that #21269 should fix this.

@alexrp
Copy link
Contributor

alexrp commented Sep 12, 2024

@andrewrk
Copy link
Member Author

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-arm 32-bit ARM backend-llvm The LLVM backend outputs an LLVM IR Module. regression It worked in a previous version of Zig, but stopped working.
Projects
None yet
Development

No branches or pull requests

3 participants