[llc] LLVM ERROR: Broken module found, compilation aborted!
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
I'm using LLVM 22.1.3 on Windows (clang+llvm-22.1.3-x86_64-pc-windows-msvc.tar.xz from releases).
Running command `llc -O=3 -filetype=obj -mtriple=arm64ec-pc-windows-msvc test.bc` gives me following error:
```
comdat global value has private linkage
ptr @"#__return_procedure"
LLVM ERROR: Broken module found, compilation aborted!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0. Program arguments: llc -O=3 -filetype=obj -mtriple=arm64ec-pc-windows-msvc test.bc
Exception Code: 0xC000001D
#0 0x00007ff614c67a26 (C:\Projects\clang+llvm-22.1.3-x86_64-pc-windows-msvc\bin\llc.exe+0x2367a26)
#1 0x00007ff614670ff1 (C:\Projects\clang+llvm-22.1.3-x86_64-pc-windows-msvc\bin\llc.exe+0x1d70ff1)
#2 0x00007ff61466a104 (C:\Projects\clang+llvm-22.1.3-x86_64-pc-windows-msvc\bin\llc.exe+0x1d6a104)
#3 0x00007ff614852449 (C:\Projects\clang+llvm-22.1.3-x86_64-pc-windows-msvc\bin\llc.exe+0x1f52449)
#4 0x00007ff614697334 (C:\Projects\clang+llvm-22.1.3-x86_64-pc-windows-msvc\bin\llc.exe+0x1d97334)
#5 0x00007ff613109a64 (C:\Projects\clang+llvm-22.1.3-x86_64-pc-windows-msvc\bin\llc.exe+0x809a64)
#6 0x00007ff61298976c (C:\Projects\clang+llvm-22.1.3-x86_64-pc-windows-msvc\bin\llc.exe+0x8976c)
#7 0x00007ff6129893e7 (C:\Projects\clang+llvm-22.1.3-x86_64-pc-windows-msvc\bin\llc.exe+0x893e7)
#8 0x00007ff612f529e6 (C:\Projects\clang+llvm-22.1.3-x86_64-pc-windows-msvc\bin\llc.exe+0x6529e6)
#9 0x00007ff61465bb48 (C:\Projects\clang+llvm-22.1.3-x86_64-pc-windows-msvc\bin\llc.exe+0x1d5bb48)
#10 0x00007fffa4f0e8d7 (C:\WINDOWS\System32\KERNEL32.DLL+0x2e8d7)
#11 0x00007fffa55ec3fc (C:\WINDOWS\SYSTEM32\ntdll.dll+0x8c3fc)
```
test.bc is in the archive:
[test.zip](https://github.com/user-attachments/files/26829104/test.zip)
Contributor guide
Research direction
Reproduce the failure with the attached test.bc archive using the reported llc command and the arm64ec-pc-windows-msvc target. Start by inspecting the broken-module diagnostic and the generated stack dump to identify the relevant compiler component. Done means the reproducer no longer aborts with the private-linkage COMDAT error.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100