Open ms178 opened 1 year ago
Hm, re-testing with ThinLTO fails a bit later now. Trying without the polly-flags next, that should make the ThinLTO case work again.
[3734/6322] Linking C shared library lib/libomp.so
FAILED: lib/libomp.so
: && /usr/bin/clang -fPIC -O3 -march=native -mtune=native -maes -mbmi2 -mpclmul -mllvm -inline-threshold=1000 -mllvm -polly -mllvm -polly-position=early -mllvm -polly-invariant-load-hoisting -mllvm -polly-loopfusion-greedy -mllvm -polly-run-inliner -mllvm -polly-run-dce -mllvm -polly-enable-delicm=true -mllvm -extra-vectorizer-passes -mllvm -enable-cond-stores-vec -mllvm -slp-vectorize-hor-store -mllvm -enable-loopinterchange -mllvm -enable-loop-distribute -mllvm -enable-unroll-and-jam -mllvm -enable-loop-flatten -mllvm -interleave-small-loop-scalar-reduction -mllvm -unroll-runtime-multi-exit -mllvm -aggressive-ext-opt -fno-math-errno -fno-trapping-math -falign-functions=32 -funroll-loops -fno-semantic-interposition -fcf-protection=none -mharden-sls=none -fomit-frame-pointer -mprefer-vector-width=256 -flto=thin -fwhole-program-vtables -fvisibility=hidden -freroll-loops -mllvm -adce-remove-loops -mllvm -enable-ext-tsp-block-placement=1 -mllvm -enable-gvn-hoist -mllvm -enable-dfa-jump-thread -fprofile-instr-use=/home/marcus/Downloads/llvm17.profdata -g0 -Wp,-D_FORTIFY_SOURCE=0 -fPIC -fno-semantic-interposition -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-comment -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-enum-constexpr-conversion -Wno-extra -Wno-pedantic -O3 -DNDEBUG -Wl,--lto-O3,-O3,-Bsymbolic-functions,--as-needed -fcf-protection=none -mharden-sls=none -Wl,-mllvm,-polly -Wl,-mllvm,-polly-invariant-load-hoisting -Wl,-mllvm -Wl,-polly-loopfusion-greedy -Wl,-mllvm -Wl,-polly-run-inliner -Wl,-mllvm -Wl,-polly-run-dce -Wl,-mllvm -Wl,-polly-enable-delicm=true -Wl,-mllvm -Wl,-extra-vectorizer-passes -Wl,-mllvm -Wl,-enable-cond-stores-vec -Wl,-mllvm -Wl,-slp-vectorize-hor-store -Wl,-mllvm -Wl,-enable-loopinterchange -Wl,-mllvm -Wl,-enable-loop-distribute -Wl,-mllvm -Wl,-enable-unroll-and-jam -Wl,-mllvm -Wl,-enable-loop-flatten -Wl,-mllvm -Wl,-interleave-small-loop-scalar-reduction -Wl,-mllvm -Wl,-unroll-runtime-multi-exit -Wl,-mllvm -Wl,-aggressive-ext-opt -Wl,-mllvm -Wl,-enable-interleaved-mem-accesses -Wl,-mllvm -Wl,-enable-masked-interleaved-mem-accesses -march=native -maes -mbmi2 -mpclmul -flto=thin -fwhole-program-vtables -fvisibility=hidden -fuse-ld=lld -Wl,-zmax-page-size=0x200000 -fprofile-instr-use=/home/marcus/Downloads/llvm17.profdata -freroll-loops -Wl,-mllvm -Wl,-adce-remove-loops -Wl,-mllvm -Wl,-enable-ext-tsp-block-placement=1 -Wl,-mllvm -Wl,-enable-gvn-hoist -Wl,-mllvm -Wl,-enable-dfa-jump-thread -Wl,--push-state -Wl,-whole-archive -ljemalloc_pic -Wl,--pop-state -lpthread -lstdc++ -lm -ldl -Wl,--push-state -Wl,-whole-archive -ljemalloc_pic -Wl,--pop-state -lpthread -lstdc++ -lm -ldl -Wl,-z,defs -Wl,-z,nodelete -fuse-ld=lld -Wl,--color-diagnostics -Wl,--as-needed -Wl,--version-script=/tmp/makepkg/llvm-git/src/llvm-project/openmp/runtime/src/exports_so.txt -static-libgcc -Wl,-z,noexecstack -shared -Wl,-soname,libomp.so -o lib/libomp.so projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_alloc.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_atomic.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_csupport.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_debug.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_itt.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_environment.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_error.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_global.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_i18n.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_io.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_runtime.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_settings.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_str.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_tasking.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_threadprivate.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_utility.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_barrier.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_wait_release.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_dispatch.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_lock.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_sched.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_collapse.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/z_Linux_util.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_gsupport.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/thirdparty/ittnotify/ittnotify_static.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_taskdeps.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_cancel.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_ftn_cdecl.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_ftn_extra.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_version.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/z_Linux_asm.S.o -lm -ldl && cd /tmp/makepkg/llvm-git/src/llvm-project/build/lib && /usr/bin/cmake -E create_symlink libomp.so libgomp.so && /usr/bin/cmake -E create_symlink libomp.so libiomp5.so
clang: warning: argument unused during compilation: '-mllvm -inline-threshold=1000' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -polly' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -polly-position=early' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -polly-invariant-load-hoisting' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -polly-loopfusion-greedy' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -polly-run-inliner' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -polly-run-dce' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -polly-enable-delicm=true' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -extra-vectorizer-passes' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -enable-cond-stores-vec' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -slp-vectorize-hor-store' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -enable-loopinterchange' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -enable-loop-distribute' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -enable-unroll-and-jam' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -enable-loop-flatten' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -interleave-small-loop-scalar-reduction' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -unroll-runtime-multi-exit' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -aggressive-ext-opt' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -adce-remove-loops' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -enable-ext-tsp-block-placement=1' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -enable-gvn-hoist' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -enable-dfa-jump-thread' [-Wunused-command-line-argument]
Instruction does not dominate all uses!
%514 = add nsw i32 %374, 1
%516 = phi i32 [ %514, %513 ], [ %374, %373 ], [ %514, %586 ]
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.
#0 0x00007f600890d407 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/bin/../lib/libLLVM-17git.so+0x330d407)
#1 0x00007f600890d8cb (/usr/bin/../lib/libLLVM-17git.so+0x330d8cb)
#2 0x00007f6004e21f10 (/usr/bin/../lib/libc.so.6+0x221f10)
#3 0x00007f6004e8fbcd pthread_kill (/usr/bin/../lib/libc.so.6+0x28fbcd)
#4 0x00007f6004e21e52 raise (/usr/bin/../lib/libc.so.6+0x221e52)
#5 0x00007f6004e004a0 abort (/usr/bin/../lib/libc.so.6+0x2004a0)
#6 0x00007f600830e83d llvm::report_fatal_error(llvm::Twine const&, bool) (/usr/bin/../lib/libLLVM-17git.so+0x2d0e83d)
#7 0x00007f6007a4bc65 (/usr/bin/../lib/libLLVM-17git.so+0x244bc65)
#8 0x00007f60085e20a5 (/usr/bin/../lib/libLLVM-17git.so+0x2fe20a5)
#9 0x00007f60085e1fed (/usr/bin/../lib/libLLVM-17git.so+0x2fe1fed)
#10 0x00007f6008186409 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/usr/bin/../lib/libLLVM-17git.so+0x2b86409)
#11 0x00007f6009e84b47 llvm::lto::opt(llvm::lto::Config const&, llvm::TargetMachine*, unsigned int, llvm::Module&, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*, std::vector<unsigned char, std::allocator<unsigned char>> const&) (/usr/bin/../lib/libLLVM-17git.so+0x4884b47)
#12 0x00007f60086f2fc4 (/usr/bin/../lib/libLLVM-17git.so+0x30f2fc4)
#13 0x00007f60086f23ae llvm::lto::thinBackend(llvm::lto::Config const&, unsigned int, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, llvm::Module&, llvm::ModuleSummaryIndex const&, llvm::StringMap<std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long>>, llvm::MallocAllocator> const&, llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*>> const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int>>, std::vector<std::pair<llvm::StringRef, llvm::BitcodeModule>, std::allocator<std::pair<llvm::StringRef, llvm::BitcodeModule>>>>*, std::vector<unsigned char, std::allocator<unsigned char>> const&) (/usr/bin/../lib/libLLVM-17git.so+0x30f23ae)
#14 0x00007f6009e805a5 (/usr/bin/../lib/libLLVM-17git.so+0x48805a5)
#15 0x00007f6009e7fcad (/usr/bin/../lib/libLLVM-17git.so+0x487fcad)
#16 0x00007f60086cdf12 (/usr/bin/../lib/libLLVM-17git.so+0x30cdf12)
#17 0x00007f60086e559f llvm::ThreadPool::processTasks(llvm::ThreadPoolTaskGroup*) (/usr/bin/../lib/libLLVM-17git.so+0x30e559f)
#18 0x00007f60088cf372 (/usr/bin/../lib/libLLVM-17git.so+0x32cf372)
#19 0x00007f6004e8dc92 (/usr/bin/../lib/libc.so.6+0x28dc92)
#20 0x00007f6004f389fc (/usr/bin/../lib/libc.so.6+0x3389fc)
clang: error: unable to execute command: Aborted
clang: error: linker command failed due to signal (use -v to see invocation)
Might be a compiler or implementation bug that manifests when we allow full inlining. What would really help here is the IR that triggers the failure. You should be able to get that via -Wl,--save-temps
in your flags and finding the temporary file for libomp.so
. Judging by the stack trace this happens in opt
so it's likely something going wrong with the IR and less LTO.
Thanks for the hint, Joseph. As I experiment with different flags from time to time, it seems to be related to the use of the Polly-flags.
All is fine (edit: for this specific file - lib/libomp.so
) when using this reduced set of flags:
export CC=clang
export CXX=clang++
export CC_LD=lld
export CXX_LD=lld
export AR=llvm-ar
export NM=llvm-nm
export STRIP=llvm-strip
export OBJCOPY=llvm-objcopy
export OBJDUMP=llvm-objdump
export READELF=llvm-readelf
export RANLIB=llvm-ranlib
export HOSTCC=clang
export HOSTCXX=clang++
export HOSTAR=llvm-ar
export CPPFLAGS="-D_FORTIFY_SOURCE=0"
export CFLAGS="-O3 -march=native -mtune=native -maes -mbmi2 -mpclmul -mllvm -inline-threshold=1000 -mllvm -extra-vectorizer-passes -mllvm -enable-cond-stores-vec -mllvm -slp-vectorize-hor-store -mllvm -enable-loopinterchange -mllvm -enable-loop-distribute -mllvm -enable-unroll-and-jam -mllvm -enable-loop-flatten -mllvm -interleave-small-loop-scalar-reduction -mllvm -unroll-runtime-multi-exit -mllvm -aggressive-ext-opt -fno-math-errno -fno-trapping-math -falign-functions=32 -funroll-loops -fno-semantic-interposition -fcf-protection=none -mharden-sls=none -fomit-frame-pointer -mprefer-vector-width=256 -flto -fwhole-program-vtables -fvisibility=hidden -freroll-loops -mllvm -adce-remove-loops -mllvm -enable-ext-tsp-block-placement=1 -mllvm -enable-gvn-hoist -mllvm -enable-dfa-jump-thread -fprofile-instr-use=/home/marcus/Downloads/llvm17.profdata"
export CXXFLAGS="${CFLAGS}"
export LDFLAGS="-Wl,--lto-O3,-O3,-Bsymbolic-functions,--as-needed -fcf-protection=none -mharden-sls=none -Wl,-mllvm -Wl,-extra-vectorizer-passes -Wl,-mllvm -Wl,-enable-cond-stores-vec -Wl,-mllvm -Wl,-slp-vectorize-hor-store -Wl,-mllvm -Wl,-enable-loopinterchange -Wl,-mllvm -Wl,-enable-loop-distribute -Wl,-mllvm -Wl,-enable-unroll-and-jam -Wl,-mllvm -Wl,-enable-loop-flatten -Wl,-mllvm -Wl,-interleave-small-loop-scalar-reduction -Wl,-mllvm -Wl,-unroll-runtime-multi-exit -Wl,-mllvm -Wl,-aggressive-ext-opt -Wl,-mllvm -Wl,-enable-interleaved-mem-accesses -Wl,-mllvm -Wl,-enable-masked-interleaved-mem-accesses -march=native -maes -mbmi2 -mpclmul -flto -fwhole-program-vtables -fvisibility=hidden -fuse-ld=lld -Wl,-zmax-page-size=0x200000 -fprofile-instr-use=/home/marcus/Downloads/llvm17.profdata -freroll-loops -Wl,-mllvm -Wl,-adce-remove-loops -Wl,-mllvm -Wl,-enable-ext-tsp-block-placement=1 -Wl,-mllvm -Wl,-enable-gvn-hoist -Wl,-mllvm -Wl,-enable-dfa-jump-thread -Wl,--push-state -Wl,-whole-archive -ljemalloc_pic -Wl,--pop-state -lpthread -lstdc++ -lm -ldl"
CCLDFLAGS="$LDFLAGS"
CXXLDFLAGS="$LDFLAGS"
export ASFLAGS="-D__AVX__=1 -D__AVX2__=1 -msse2avx -D__FMA__=1"
Whereas these flags are problematic:
export CC=clang
export CXX=clang++
export CC_LD=lld
export CXX_LD=lld
export AR=llvm-ar
export NM=llvm-nm
export STRIP=llvm-strip
export OBJCOPY=llvm-objcopy
export OBJDUMP=llvm-objdump
export READELF=llvm-readelf
export RANLIB=llvm-ranlib
export HOSTCC=clang
export HOSTCXX=clang++
export HOSTAR=llvm-ar
export CPPFLAGS="-D_FORTIFY_SOURCE=0"
export CFLAGS="-O3 -march=native -mtune=native -maes -mbmi2 -mpclmul -mllvm -inline-threshold=1000 -mllvm -polly -mllvm -polly-position=early -mllvm -polly-invariant-load-hoisting -mllvm -polly-loopfusion-greedy -mllvm -polly-run-inliner -mllvm -polly-run-dce -mllvm -polly-enable-delicm=true -mllvm -extra-vectorizer-passes -mllvm -enable-cond-stores-vec -mllvm -slp-vectorize-hor-store -mllvm -enable-loopinterchange -mllvm -enable-loop-distribute -mllvm -enable-unroll-and-jam -mllvm -enable-loop-flatten -mllvm -interleave-small-loop-scalar-reduction -mllvm -unroll-runtime-multi-exit -mllvm -aggressive-ext-opt -fno-math-errno -fno-trapping-math -falign-functions=32 -funroll-loops -fno-semantic-interposition -fcf-protection=none -mharden-sls=none -fomit-frame-pointer -mprefer-vector-width=256 -flto=thin -fwhole-program-vtables -fvisibility=hidden -freroll-loops -mllvm -adce-remove-loops -mllvm -enable-ext-tsp-block-placement=1 -mllvm -enable-gvn-hoist -mllvm -enable-dfa-jump-thread -fprofile-instr-use=/home/marcus/Downloads/llvm17.profdata"
export CXXFLAGS="${CFLAGS}"
export LDFLAGS="-Wl,--lto-O3,-O3,-Bsymbolic-functions,--as-needed -fcf-protection=none -mharden-sls=none -Wl,-mllvm,-polly -Wl,-mllvm,-polly-invariant-load-hoisting -Wl,-mllvm -Wl,-polly-loopfusion-greedy -Wl,-mllvm -Wl,-polly-run-inliner -Wl,-mllvm -Wl,-polly-run-dce -Wl,-mllvm -Wl,-polly-enable-delicm=true -Wl,-mllvm -Wl,-extra-vectorizer-passes -Wl,-mllvm -Wl,-enable-cond-stores-vec -Wl,-mllvm -Wl,-slp-vectorize-hor-store -Wl,-mllvm -Wl,-enable-loopinterchange -Wl,-mllvm -Wl,-enable-loop-distribute -Wl,-mllvm -Wl,-enable-unroll-and-jam -Wl,-mllvm -Wl,-enable-loop-flatten -Wl,-mllvm -Wl,-interleave-small-loop-scalar-reduction -Wl,-mllvm -Wl,-unroll-runtime-multi-exit -Wl,-mllvm -Wl,-aggressive-ext-opt -Wl,-mllvm -Wl,-enable-interleaved-mem-accesses -Wl,-mllvm -Wl,-enable-masked-interleaved-mem-accesses -march=native -maes -mbmi2 -mpclmul -flto=thin -fwhole-program-vtables -fvisibility=hidden -fuse-ld=lld -Wl,-zmax-page-size=0x200000 -fprofile-instr-use=/home/marcus/Downloads/llvm17.profdata -freroll-loops -Wl,-mllvm -Wl,-adce-remove-loops -Wl,-mllvm -Wl,-enable-ext-tsp-block-placement=1 -Wl,-mllvm -Wl,-enable-gvn-hoist -Wl,-mllvm -Wl,-enable-dfa-jump-thread -Wl,--push-state -Wl,-whole-archive -ljemalloc_pic -Wl,--pop-state -lpthread -lstdc++ -lm -ldl"
CCLDFLAGS="$LDFLAGS"
CXXLDFLAGS="$LDFLAGS"
export ASFLAGS="-D__AVX__=1 -D__AVX2__=1 -msse2avx -D__FMA__=1"
I'll try to follow your suggestion to come up with something actionable.
For completeness, without the polly flags, I now see similar failures while linking bin/llvm-exegesis
and lib/libLLVM-17git.so
later on in the build.
[5286/6322] Linking CXX executable bin/llvm-exegesis
FAILED: bin/llvm-exegesis
: && /usr/bin/clang++ -O3 -march=native -mtune=native -maes -mbmi2 -mpclmul -mllvm -inline-threshold=1000 -mllvm -extra-vectorizer-passes -mllvm -enable-cond-stores-vec -mllvm -slp-vectorize-hor-store -mllvm -enable-loopinterchange -mllvm -enable-loop-distribute -mllvm -enable-unroll-and-jam -mllvm -enable-loop-flatten -mllvm -interleave-small-loop-scalar-reduction -mllvm -unroll-runtime-multi-exit -mllvm -aggressive-ext-opt -fno-math-errno -fno-trapping-math -falign-functions=32 -funroll-loops -fno-semantic-interposition -fcf-protection=none -mharden-sls=none -fomit-frame-pointer -mprefer-vector-width=256 -flto -fwhole-program-vtables -fvisibility=hidden -freroll-loops -mllvm -adce-remove-loops -mllvm -enable-ext-tsp-block-placement=1 -mllvm -enable-gvn-hoist -mllvm -enable-dfa-jump-thread -fprofile-instr-use=/home/marcus/Downloads/llvm17.profdata -g0 -Wp,-D_FORTIFY_SOURCE=0 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,--lto-O3,-O3,-Bsymbolic-functions,--as-needed -fcf-protection=none -mharden-sls=none -Wl,-mllvm -Wl,-extra-vectorizer-passes -Wl,-mllvm -Wl,-enable-cond-stores-vec -Wl,-mllvm -Wl,-slp-vectorize-hor-store -Wl,-mllvm -Wl,-enable-loopinterchange -Wl,-mllvm -Wl,-enable-loop-distribute -Wl,-mllvm -Wl,-enable-unroll-and-jam -Wl,-mllvm -Wl,-enable-loop-flatten -Wl,-mllvm -Wl,-interleave-small-loop-scalar-reduction -Wl,-mllvm -Wl,-unroll-runtime-multi-exit -Wl,-mllvm -Wl,-aggressive-ext-opt -Wl,-mllvm -Wl,-enable-interleaved-mem-accesses -Wl,-mllvm -Wl,-enable-masked-interleaved-mem-accesses -march=native -maes -mbmi2 -mpclmul -flto -fwhole-program-vtables -fvisibility=hidden -fuse-ld=lld -Wl,-zmax-page-size=0x200000 -fprofile-instr-use=/home/marcus/Downloads/llvm17.profdata -freroll-loops -Wl,-mllvm -Wl,-adce-remove-loops -Wl,-mllvm -Wl,-enable-ext-tsp-block-placement=1 -Wl,-mllvm -Wl,-enable-gvn-hoist -Wl,-mllvm -Wl,-enable-dfa-jump-thread -Wl,--push-state -Wl,-whole-archive -ljemalloc_pic -Wl,--pop-state -lpthread -lstdc++ -lm -ldl -Wl,--push-state -Wl,-whole-archive -ljemalloc_pic -Wl,--pop-state -lpthread -lstdc++ -lm -ldl -fuse-ld=lld -Wl,--color-diagnostics -Wl,--gc-sections tools/llvm-exegesis/CMakeFiles/llvm-exegesis.dir/llvm-exegesis.cpp.o -o bin/llvm-exegesis -Wl,-rpath,"\$ORIGIN/../lib:" lib/libLLVMAMDGPUAsmParser.a lib/libLLVMX86AsmParser.a lib/libLLVMBPFAsmParser.a lib/libLLVMAMDGPUCodeGen.a lib/libLLVMX86CodeGen.a lib/libLLVMBPFCodeGen.a lib/libLLVMAMDGPUDesc.a lib/libLLVMX86Desc.a lib/libLLVMBPFDesc.a lib/libLLVMAMDGPUDisassembler.a lib/libLLVMX86Disassembler.a lib/libLLVMBPFDisassembler.a lib/libLLVMAMDGPUInfo.a lib/libLLVMX86Info.a lib/libLLVMBPFInfo.a lib/libLLVMCodeGenTypes.a lib/libLLVMMC.a lib/libLLVMMCParser.a lib/libLLVMSupport.a lib/libLLVMTargetParser.a lib/libLLVMExegesis.a lib/libLLVMExegesisX86.a lib/libLLVMMIRParser.a lib/libLLVMPasses.a lib/libLLVMCoroutines.a lib/libLLVMIRPrinter.a lib/libLLVMipo.a lib/libLLVMVectorize.a lib/libLLVMFrontendOpenMP.a lib/libLLVMLinker.a lib/libLLVMAMDGPUDesc.a lib/libLLVMAMDGPUInfo.a lib/libLLVMAMDGPUUtils.a lib/libLLVMX86AsmParser.a lib/libLLVMX86CodeGen.a lib/libLLVMAsmPrinter.a lib/libLLVMCFGuard.a lib/libLLVMInstrumentation.a lib/libLLVMX86Desc.a lib/libLLVMX86Disassembler.a lib/libLLVMX86Info.a lib/libLLVMExegesis.a lib/libLLVMGlobalISel.a lib/libLLVMSelectionDAG.a lib/libLLVMMCDisassembler.a lib/libLLVMMCA.a lib/libLLVMMCJIT.a lib/libLLVMExecutionEngine.a lib/libLLVMOrcTargetProcess.a lib/libLLVMOrcShared.a lib/libLLVMObjectYAML.a lib/libLLVMRuntimeDyld.a lib/libLLVMCodeGen.a lib/libLLVMCodeGenTypes.a lib/libLLVMScalarOpts.a lib/libLLVMAggressiveInstCombine.a lib/libLLVMInstCombine.a lib/libLLVMTarget.a lib/libLLVMBitWriter.a lib/libLLVMObjCARCOpts.a lib/libLLVMTransformUtils.a lib/libLLVMAnalysis.a lib/libLLVMProfileData.a lib/libLLVMSymbolize.a lib/libLLVMDebugInfoDWARF.a lib/libLLVMDebugInfoPDB.a lib/libLLVMDebugInfoMSF.a lib/libLLVMDebugInfoBTF.a lib/libLLVMObject.a lib/libLLVMMCParser.a lib/libLLVMMC.a lib/libLLVMDebugInfoCodeView.a lib/libLLVMIRReader.a lib/libLLVMBitReader.a lib/libLLVMAsmParser.a lib/libLLVMTextAPI.a lib/libLLVMCore.a lib/libLLVMBinaryFormat.a lib/libLLVMTargetParser.a lib/libLLVMRemarks.a lib/libLLVMBitstreamReader.a lib/libLLVMSupport.a -lrt -ldl -lm /usr/lib/libz.so /usr/lib/libzstd.so /usr/lib/libtinfo.so lib/libLLVMDemangle.a && :
clang++: warning: argument unused during compilation: '-mllvm -inline-threshold=1000' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -extra-vectorizer-passes' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -enable-cond-stores-vec' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -slp-vectorize-hor-store' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -enable-loopinterchange' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -enable-loop-distribute' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -enable-unroll-and-jam' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -enable-loop-flatten' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -interleave-small-loop-scalar-reduction' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -unroll-runtime-multi-exit' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -aggressive-ext-opt' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -adce-remove-loops' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -enable-ext-tsp-block-placement=1' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -enable-gvn-hoist' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -enable-dfa-jump-thread' [-Wunused-command-line-argument]
Instruction does not dominate all uses!
%155 = icmp eq <2 x ptr> %154, %136
%153 = shufflevector <2 x i1> %155, <2 x i1> %152, <4 x i32> <i32 1, i32 0, i32 3, i32 2>
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.
Stack dump:
0. Program arguments: /usr/bin/ld.lld --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o bin/llvm-exegesis /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../lib64/crt1.o /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../lib64/crti.o /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1/crtbegin.o -L/usr/lib/clang/17/lib/x86_64-pc-linux-gnu -L/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1 -L/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/lib -L/usr/lib -plugin-opt=mcpu=haswell -plugin-opt=O3 -plugin-opt=-function-sections=1 -plugin-opt=-data-sections=1 -plugin-opt=cs-profile-path=/home/marcus/Downloads/llvm17.profdata --lto-O3 -O3 -Bsymbolic-functions --as-needed -mllvm -extra-vectorizer-passes -mllvm -enable-cond-stores-vec -mllvm -slp-vectorize-hor-store -mllvm -enable-loopinterchange -mllvm -enable-loop-distribute -mllvm -enable-unroll-and-jam -mllvm -enable-loop-flatten -mllvm -interleave-small-loop-scalar-reduction -mllvm -unroll-runtime-multi-exit -mllvm -aggressive-ext-opt -mllvm -enable-interleaved-mem-accesses -mllvm -enable-masked-interleaved-mem-accesses -zmax-page-size=0x200000 -mllvm -adce-remove-loops -mllvm -enable-ext-tsp-block-placement=1 -mllvm -enable-gvn-hoist -mllvm -enable-dfa-jump-thread --push-state -whole-archive -ljemalloc_pic --pop-state -lpthread -lstdc++ -lm -ldl --push-state -whole-archive -ljemalloc_pic --pop-state -lpthread -lstdc++ -lm -ldl --color-diagnostics --gc-sections tools/llvm-exegesis/CMakeFiles/llvm-exegesis.dir/llvm-exegesis.cpp.o -rpath $ORIGIN/../lib: lib/libLLVMAMDGPUAsmParser.a lib/libLLVMX86AsmParser.a lib/libLLVMBPFAsmParser.a lib/libLLVMAMDGPUCodeGen.a lib/libLLVMX86CodeGen.a lib/libLLVMBPFCodeGen.a lib/libLLVMAMDGPUDesc.a lib/libLLVMX86Desc.a lib/libLLVMBPFDesc.a lib/libLLVMAMDGPUDisassembler.a lib/libLLVMX86Disassembler.a lib/libLLVMBPFDisassembler.a lib/libLLVMAMDGPUInfo.a lib/libLLVMX86Info.a lib/libLLVMBPFInfo.a lib/libLLVMCodeGenTypes.a lib/libLLVMMC.a lib/libLLVMMCParser.a lib/libLLVMSupport.a lib/libLLVMTargetParser.a lib/libLLVMExegesis.a lib/libLLVMExegesisX86.a lib/libLLVMMIRParser.a lib/libLLVMPasses.a lib/libLLVMCoroutines.a lib/libLLVMIRPrinter.a lib/libLLVMipo.a lib/libLLVMVectorize.a lib/libLLVMFrontendOpenMP.a lib/libLLVMLinker.a lib/libLLVMAMDGPUDesc.a lib/libLLVMAMDGPUInfo.a lib/libLLVMAMDGPUUtils.a lib/libLLVMX86AsmParser.a lib/libLLVMX86CodeGen.a lib/libLLVMAsmPrinter.a lib/libLLVMCFGuard.a lib/libLLVMInstrumentation.a lib/libLLVMX86Desc.a lib/libLLVMX86Disassembler.a lib/libLLVMX86Info.a lib/libLLVMExegesis.a lib/libLLVMGlobalISel.a lib/libLLVMSelectionDAG.a lib/libLLVMMCDisassembler.a lib/libLLVMMCA.a lib/libLLVMMCJIT.a lib/libLLVMExecutionEngine.a lib/libLLVMOrcTargetProcess.a lib/libLLVMOrcShared.a lib/libLLVMObjectYAML.a lib/libLLVMRuntimeDyld.a lib/libLLVMCodeGen.a lib/libLLVMCodeGenTypes.a lib/libLLVMScalarOpts.a lib/libLLVMAggressiveInstCombine.a lib/libLLVMInstCombine.a lib/libLLVMTarget.a lib/libLLVMBitWriter.a lib/libLLVMObjCARCOpts.a lib/libLLVMTransformUtils.a lib/libLLVMAnalysis.a lib/libLLVMProfileData.a lib/libLLVMSymbolize.a lib/libLLVMDebugInfoDWARF.a lib/libLLVMDebugInfoPDB.a lib/libLLVMDebugInfoMSF.a lib/libLLVMDebugInfoBTF.a lib/libLLVMObject.a lib/libLLVMMCParser.a lib/libLLVMMC.a lib/libLLVMDebugInfoCodeView.a lib/libLLVMIRReader.a lib/libLLVMBitReader.a lib/libLLVMAsmParser.a lib/libLLVMTextAPI.a lib/libLLVMCore.a lib/libLLVMBinaryFormat.a lib/libLLVMTargetParser.a lib/libLLVMRemarks.a lib/libLLVMBitstreamReader.a lib/libLLVMSupport.a -lrt -ldl -lm /usr/lib/libz.so /usr/lib/libzstd.so /usr/lib/libtinfo.so lib/libLLVMDemangle.a -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1/crtend.o /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../lib64/crtn.o
#0 0x00007f642bd0d407 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/bin/../lib/libLLVM-17git.so+0x330d407)
#1 0x00007f642bd0d8cb (/usr/bin/../lib/libLLVM-17git.so+0x330d8cb)
#2 0x00007f6428221f10 (/usr/bin/../lib/libc.so.6+0x221f10)
#3 0x00007f642828fbcd pthread_kill (/usr/bin/../lib/libc.so.6+0x28fbcd)
#4 0x00007f6428221e52 raise (/usr/bin/../lib/libc.so.6+0x221e52)
#5 0x00007f64282004a0 abort (/usr/bin/../lib/libc.so.6+0x2004a0)
#6 0x00007f642b70e83d llvm::report_fatal_error(llvm::Twine const&, bool) (/usr/bin/../lib/libLLVM-17git.so+0x2d0e83d)
#7 0x00007f642ae4bc65 (/usr/bin/../lib/libLLVM-17git.so+0x244bc65)
#8 0x00007f642b9e20a5 (/usr/bin/../lib/libLLVM-17git.so+0x2fe20a5)
#9 0x00007f642b9e1fed (/usr/bin/../lib/libLLVM-17git.so+0x2fe1fed)
#10 0x00007f642b586409 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/usr/bin/../lib/libLLVM-17git.so+0x2b86409)
#11 0x00007f642d284b47 llvm::lto::opt(llvm::lto::Config const&, llvm::TargetMachine*, unsigned int, llvm::Module&, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*, std::vector<unsigned char, std::allocator<unsigned char>> const&) (/usr/bin/../lib/libLLVM-17git.so+0x4884b47)
#12 0x00007f642d286064 llvm::lto::backend(llvm::lto::Config const&, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex&) (/usr/bin/../lib/libLLVM-17git.so+0x4886064)
#13 0x00007f642b9c9a67 llvm::lto::LTO::runRegularLTO(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>) (/usr/bin/../lib/libLLVM-17git.so+0x2fc9a67)
#14 0x00007f642b9c4290 llvm::lto::LTO::run(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, std::function<llvm::Expected<std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>> (unsigned int, llvm::StringRef, llvm::Twine const&)>) (/usr/bin/../lib/libLLVM-17git.so+0x2fc4290)
#15 0x000055590baf07b4 lld::elf::BitcodeCompiler::compile() (/usr/bin/ld.lld+0x4f07b4)
#16 0x000055590ba47205 lld::elf::LinkerDriver::link(llvm::opt::InputArgList&) (/usr/bin/ld.lld+0x447205)
#17 0x000055590ba36af9 lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) (/usr/bin/ld.lld+0x436af9)
#18 0x000055590ba34c18 lld::elf::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) (/usr/bin/ld.lld+0x434c18)
#19 0x000055590b94fee1 lld::unsafeLldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>, bool) (/usr/bin/ld.lld+0x34fee1)
#20 0x000055590b92677c lld_main(int, char**, llvm::ToolContext const&) (/usr/bin/ld.lld+0x32677c)
#21 0x000055590b92662c main (/usr/bin/ld.lld+0x32662c)
#22 0x00007f6428201b07 (/usr/bin/../lib/libc.so.6+0x201b07)
#23 0x00007f6428201bc4 __libc_start_main (/usr/bin/../lib/libc.so.6+0x201bc4)
#24 0x000055590b9293b1 _start (/usr/bin/ld.lld+0x3293b1)
clang++: error: unable to execute command: Aborted
clang++: error: linker command failed due to signal (use -v to see invocation)
[5287/6322] Linking CXX shared library lib/libLLVM-17git.so
FAILED: lib/libLLVM-17git.so
: && /usr/bin/clang++ -fPIC -O3 -march=native -mtune=native -maes -mbmi2 -mpclmul -mllvm -inline-threshold=1000 -mllvm -extra-vectorizer-passes -mllvm -enable-cond-stores-vec -mllvm -slp-vectorize-hor-store -mllvm -enable-loopinterchange -mllvm -enable-loop-distribute -mllvm -enable-unroll-and-jam -mllvm -enable-loop-flatten -mllvm -interleave-small-loop-scalar-reduction -mllvm -unroll-runtime-multi-exit -mllvm -aggressive-ext-opt -fno-math-errno -fno-trapping-math -falign-functions=32 -funroll-loops -fno-semantic-interposition -fcf-protection=none -mharden-sls=none -fomit-frame-pointer -mprefer-vector-width=256 -flto -fwhole-program-vtables -fvisibility=hidden -freroll-loops -mllvm -adce-remove-loops -mllvm -enable-ext-tsp-block-placement=1 -mllvm -enable-gvn-hoist -mllvm -enable-dfa-jump-thread -fprofile-instr-use=/home/marcus/Downloads/llvm17.profdata -g0 -Wp,-D_FORTIFY_SOURCE=0 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,--lto-O3,-O3,-Bsymbolic-functions,--as-needed -fcf-protection=none -mharden-sls=none -Wl,-mllvm -Wl,-extra-vectorizer-passes -Wl,-mllvm -Wl,-enable-cond-stores-vec -Wl,-mllvm -Wl,-slp-vectorize-hor-store -Wl,-mllvm -Wl,-enable-loopinterchange -Wl,-mllvm -Wl,-enable-loop-distribute -Wl,-mllvm -Wl,-enable-unroll-and-jam -Wl,-mllvm -Wl,-enable-loop-flatten -Wl,-mllvm -Wl,-interleave-small-loop-scalar-reduction -Wl,-mllvm -Wl,-unroll-runtime-multi-exit -Wl,-mllvm -Wl,-aggressive-ext-opt -Wl,-mllvm -Wl,-enable-interleaved-mem-accesses -Wl,-mllvm -Wl,-enable-masked-interleaved-mem-accesses -march=native -maes -mbmi2 -mpclmul -flto -fwhole-program-vtables -fvisibility=hidden -fuse-ld=lld -Wl,-zmax-page-size=0x200000 -fprofile-instr-use=/home/marcus/Downloads/llvm17.profdata -freroll-loops -Wl,-mllvm -Wl,-adce-remove-loops -Wl,-mllvm -Wl,-enable-ext-tsp-block-placement=1 -Wl,-mllvm -Wl,-enable-gvn-hoist -Wl,-mllvm -Wl,-enable-dfa-jump-thread -Wl,--push-state -Wl,-whole-archive -ljemalloc_pic -Wl,--pop-state -lpthread -lstdc++ -lm -ldl -Wl,--push-state -Wl,-whole-archive -ljemalloc_pic -Wl,--pop-state -lpthread -lstdc++ -lm -ldl -Wl,-z,defs -Wl,-z,nodelete -fuse-ld=lld -Wl,--color-diagnostics -Wl,--gc-sections -Xlinker -Bsymbolic-functions -shared -Wl,-soname,libLLVM-17git.so -o lib/libLLVM-17git.so tools/llvm-shlib/CMakeFiles/LLVM.dir/libllvm.cpp.o -Wl,-rpath,"\$ORIGIN/../lib:" -Wl,--version-script,/tmp/makepkg/llvm-git/src/llvm-project/build/./lib/tools/llvm-shlib/simple_version_script.map -Wl,--whole-archive lib/libLLVMDemangle.a lib/libLLVMSupport.a lib/libLLVMCore.a lib/libLLVMFuzzerCLI.a lib/libLLVMFuzzMutate.a lib/libLLVMFileCheck.a lib/libLLVMInterfaceStub.a lib/libLLVMIRPrinter.a lib/libLLVMIRReader.a lib/libLLVMCodeGenTypes.a lib/libLLVMCodeGen.a lib/libLLVMSelectionDAG.a lib/libLLVMAsmPrinter.a lib/libLLVMMIRParser.a lib/libLLVMGlobalISel.a lib/libLLVMBinaryFormat.a lib/libLLVMBitReader.a lib/libLLVMBitWriter.a lib/libLLVMBitstreamReader.a lib/libLLVMDWARFLinker.a lib/libLLVMDWARFLinkerParallel.a lib/libLLVMExtensions.a lib/libLLVMFrontendHLSL.a lib/libLLVMFrontendOpenACC.a lib/libLLVMFrontendOpenMP.a lib/libLLVMTransformUtils.a lib/libLLVMInstrumentation.a lib/libLLVMAggressiveInstCombine.a lib/libLLVMInstCombine.a lib/libLLVMScalarOpts.a lib/libLLVMipo.a lib/libLLVMVectorize.a lib/libLLVMObjCARCOpts.a lib/libLLVMCoroutines.a lib/libLLVMCFGuard.a lib/libLLVMLinker.a lib/libLLVMAnalysis.a lib/libLLVMLTO.a lib/libLLVMMC.a lib/libLLVMMCParser.a lib/libLLVMMCDisassembler.a lib/libLLVMMCA.a lib/libLLVMObjCopy.a lib/libLLVMObject.a lib/libLLVMObjectYAML.a lib/libLLVMOption.a lib/libLLVMRemarks.a lib/libLLVMDebugInfoDWARF.a lib/libLLVMDebugInfoGSYM.a lib/libLLVMDebugInfoLogicalView.a lib/libLLVMDebugInfoMSF.a lib/libLLVMDebugInfoCodeView.a lib/libLLVMDebugInfoPDB.a lib/libLLVMSymbolize.a lib/libLLVMDebugInfoBTF.a lib/libLLVMDWP.a lib/libLLVMExecutionEngine.a lib/libLLVMInterpreter.a lib/libLLVMJITLink.a lib/libLLVMMCJIT.a lib/libLLVMOrcJIT.a lib/libLLVMOrcShared.a lib/libLLVMOrcTargetProcess.a lib/libLLVMRuntimeDyld.a lib/libLLVMTarget.a lib/libLLVMAMDGPUCodeGen.a lib/libLLVMAMDGPUAsmParser.a lib/libLLVMAMDGPUDisassembler.a lib/libLLVMAMDGPUTargetMCA.a lib/libLLVMAMDGPUDesc.a lib/libLLVMAMDGPUInfo.a lib/libLLVMAMDGPUUtils.a lib/libLLVMX86CodeGen.a lib/libLLVMX86AsmParser.a lib/libLLVMX86Disassembler.a lib/libLLVMX86TargetMCA.a lib/libLLVMX86Desc.a lib/libLLVMX86Info.a lib/libLLVMBPFCodeGen.a lib/libLLVMBPFAsmParser.a lib/libLLVMBPFDisassembler.a lib/libLLVMBPFDesc.a lib/libLLVMBPFInfo.a lib/libLLVMAsmParser.a lib/libLLVMLineEditor.a lib/libLLVMProfileData.a lib/libLLVMCoverage.a lib/libLLVMPasses.a lib/libLLVMTargetParser.a lib/libLLVMTextAPI.a lib/libLLVMDlltoolDriver.a lib/libLLVMLibDriver.a lib/libLLVMXRay.a lib/libLLVMWindowsDriver.a lib/libLLVMWindowsManifest.a -Wl,--no-whole-archive lib/libLLVMExtensions.a lib/libPolly.a lib/libPollyISL.a /usr/lib/libffi.so lib/libLLVMExecutionEngine.a lib/libLLVMJITLink.a lib/libLLVMOrcTargetProcess.a lib/libLLVMOrcShared.a lib/libLLVMRuntimeDyld.a lib/libLLVMMIRParser.a lib/libLLVMPasses.a lib/libLLVMIRPrinter.a lib/libLLVMCoroutines.a lib/libLLVMGlobalISel.a lib/libLLVMCFGuard.a lib/libLLVMMCA.a lib/libLLVMSelectionDAG.a lib/libLLVMAsmPrinter.a lib/libLLVMCodeGen.a lib/libLLVMCodeGenTypes.a lib/libLLVMObjCARCOpts.a lib/libLLVMipo.a lib/libLLVMBitWriter.a lib/libLLVMFrontendOpenMP.a lib/libLLVMInstrumentation.a lib/libLLVMScalarOpts.a lib/libLLVMAggressiveInstCombine.a lib/libLLVMInstCombine.a lib/libLLVMVectorize.a lib/libLLVMLinker.a lib/libLLVMTransformUtils.a lib/libLLVMTarget.a lib/libLLVMAnalysis.a lib/libLLVMMCDisassembler.a /usr/lib/libedit.so lib/libLLVMProfileData.a lib/libLLVMSymbolize.a lib/libLLVMDebugInfoDWARF.a lib/libLLVMDebugInfoPDB.a lib/libLLVMDebugInfoMSF.a lib/libLLVMDebugInfoBTF.a lib/libLLVMOption.a lib/libLLVMObject.a lib/libLLVMIRReader.a lib/libLLVMAsmParser.a lib/libLLVMBitReader.a lib/libLLVMCore.a lib/libLLVMRemarks.a lib/libLLVMBitstreamReader.a lib/libLLVMMCParser.a lib/libLLVMMC.a lib/libLLVMDebugInfoCodeView.a lib/libLLVMTextAPI.a lib/libLLVMBinaryFormat.a lib/libLLVMTargetParser.a lib/libLLVMSupport.a lib/libLLVMDemangle.a -lrt -ldl -lm /usr/lib/libz.so /usr/lib/libzstd.so /usr/lib/libtinfo.so /usr/lib/libxml2.so && :
clang++: warning: argument unused during compilation: '-mllvm -inline-threshold=1000' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -extra-vectorizer-passes' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -enable-cond-stores-vec' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -slp-vectorize-hor-store' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -enable-loopinterchange' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -enable-loop-distribute' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -enable-unroll-and-jam' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -enable-loop-flatten' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -interleave-small-loop-scalar-reduction' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -unroll-runtime-multi-exit' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -aggressive-ext-opt' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -adce-remove-loops' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -enable-ext-tsp-block-placement=1' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -enable-gvn-hoist' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mllvm -enable-dfa-jump-thread' [-Wunused-command-line-argument]
Instruction does not dominate all uses!
%155 = icmp eq <2 x ptr> %154, %136
%153 = shufflevector <2 x i1> %155, <2 x i1> %152, <4 x i32> <i32 1, i32 0, i32 3, i32 2>
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.
Stack dump:
0. Program arguments: /usr/bin/ld.lld --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -shared -o lib/libLLVM-17git.so /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../lib64/crti.o /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1/crtbeginS.o -L/usr/lib/clang/17/lib/x86_64-pc-linux-gnu -L/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1 -L/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/lib -L/usr/lib -plugin-opt=mcpu=haswell -plugin-opt=O3 -plugin-opt=-function-sections=1 -plugin-opt=-data-sections=1 -plugin-opt=cs-profile-path=/home/marcus/Downloads/llvm17.profdata --lto-O3 -O3 -Bsymbolic-functions --as-needed -mllvm -extra-vectorizer-passes -mllvm -enable-cond-stores-vec -mllvm -slp-vectorize-hor-store -mllvm -enable-loopinterchange -mllvm -enable-loop-distribute -mllvm -enable-unroll-and-jam -mllvm -enable-loop-flatten -mllvm -interleave-small-loop-scalar-reduction -mllvm -unroll-runtime-multi-exit -mllvm -aggressive-ext-opt -mllvm -enable-interleaved-mem-accesses -mllvm -enable-masked-interleaved-mem-accesses -zmax-page-size=0x200000 -mllvm -adce-remove-loops -mllvm -enable-ext-tsp-block-placement=1 -mllvm -enable-gvn-hoist -mllvm -enable-dfa-jump-thread --push-state -whole-archive -ljemalloc_pic --pop-state -lpthread -lstdc++ -lm -ldl --push-state -whole-archive -ljemalloc_pic --pop-state -lpthread -lstdc++ -lm -ldl -z defs -z nodelete --color-diagnostics --gc-sections -Bsymbolic-functions -soname libLLVM-17git.so tools/llvm-shlib/CMakeFiles/LLVM.dir/libllvm.cpp.o -rpath $ORIGIN/../lib: --version-script /tmp/makepkg/llvm-git/src/llvm-project/build/./lib/tools/llvm-shlib/simple_version_script.map --whole-archive lib/libLLVMDemangle.a lib/libLLVMSupport.a lib/libLLVMCore.a lib/libLLVMFuzzerCLI.a lib/libLLVMFuzzMutate.a lib/libLLVMFileCheck.a lib/libLLVMInterfaceStub.a lib/libLLVMIRPrinter.a lib/libLLVMIRReader.a lib/libLLVMCodeGenTypes.a lib/libLLVMCodeGen.a lib/libLLVMSelectionDAG.a lib/libLLVMAsmPrinter.a lib/libLLVMMIRParser.a lib/libLLVMGlobalISel.a lib/libLLVMBinaryFormat.a lib/libLLVMBitReader.a lib/libLLVMBitWriter.a lib/libLLVMBitstreamReader.a lib/libLLVMDWARFLinker.a lib/libLLVMDWARFLinkerParallel.a lib/libLLVMExtensions.a lib/libLLVMFrontendHLSL.a lib/libLLVMFrontendOpenACC.a lib/libLLVMFrontendOpenMP.a lib/libLLVMTransformUtils.a lib/libLLVMInstrumentation.a lib/libLLVMAggressiveInstCombine.a lib/libLLVMInstCombine.a lib/libLLVMScalarOpts.a lib/libLLVMipo.a lib/libLLVMVectorize.a lib/libLLVMObjCARCOpts.a lib/libLLVMCoroutines.a lib/libLLVMCFGuard.a lib/libLLVMLinker.a lib/libLLVMAnalysis.a lib/libLLVMLTO.a lib/libLLVMMC.a lib/libLLVMMCParser.a lib/libLLVMMCDisassembler.a lib/libLLVMMCA.a lib/libLLVMObjCopy.a lib/libLLVMObject.a lib/libLLVMObjectYAML.a lib/libLLVMOption.a lib/libLLVMRemarks.a lib/libLLVMDebugInfoDWARF.a lib/libLLVMDebugInfoGSYM.a lib/libLLVMDebugInfoLogicalView.a lib/libLLVMDebugInfoMSF.a lib/libLLVMDebugInfoCodeView.a lib/libLLVMDebugInfoPDB.a lib/libLLVMSymbolize.a lib/libLLVMDebugInfoBTF.a lib/libLLVMDWP.a lib/libLLVMExecutionEngine.a lib/libLLVMInterpreter.a lib/libLLVMJITLink.a lib/libLLVMMCJIT.a lib/libLLVMOrcJIT.a lib/libLLVMOrcShared.a lib/libLLVMOrcTargetProcess.a lib/libLLVMRuntimeDyld.a lib/libLLVMTarget.a lib/libLLVMAMDGPUCodeGen.a lib/libLLVMAMDGPUAsmParser.a lib/libLLVMAMDGPUDisassembler.a lib/libLLVMAMDGPUTargetMCA.a lib/libLLVMAMDGPUDesc.a lib/libLLVMAMDGPUInfo.a lib/libLLVMAMDGPUUtils.a lib/libLLVMX86CodeGen.a lib/libLLVMX86AsmParser.a lib/libLLVMX86Disassembler.a lib/libLLVMX86TargetMCA.a lib/libLLVMX86Desc.a lib/libLLVMX86Info.a lib/libLLVMBPFCodeGen.a lib/libLLVMBPFAsmParser.a lib/libLLVMBPFDisassembler.a lib/libLLVMBPFDesc.a lib/libLLVMBPFInfo.a lib/libLLVMAsmParser.a lib/libLLVMLineEditor.a lib/libLLVMProfileData.a lib/libLLVMCoverage.a lib/libLLVMPasses.a lib/libLLVMTargetParser.a lib/libLLVMTextAPI.a lib/libLLVMDlltoolDriver.a lib/libLLVMLibDriver.a lib/libLLVMXRay.a lib/libLLVMWindowsDriver.a lib/libLLVMWindowsManifest.a --no-whole-archive lib/libLLVMExtensions.a lib/libPolly.a lib/libPollyISL.a /usr/lib/libffi.so lib/libLLVMExecutionEngine.a lib/libLLVMJITLink.a lib/libLLVMOrcTargetProcess.a lib/libLLVMOrcShared.a lib/libLLVMRuntimeDyld.a lib/libLLVMMIRParser.a lib/libLLVMPasses.a lib/libLLVMIRPrinter.a lib/libLLVMCoroutines.a lib/libLLVMGlobalISel.a lib/libLLVMCFGuard.a lib/libLLVMMCA.a lib/libLLVMSelectionDAG.a lib/libLLVMAsmPrinter.a lib/libLLVMCodeGen.a lib/libLLVMCodeGenTypes.a lib/libLLVMObjCARCOpts.a lib/libLLVMipo.a lib/libLLVMBitWriter.a lib/libLLVMFrontendOpenMP.a lib/libLLVMInstrumentation.a lib/libLLVMScalarOpts.a lib/libLLVMAggressiveInstCombine.a lib/libLLVMInstCombine.a lib/libLLVMVectorize.a lib/libLLVMLinker.a lib/libLLVMTransformUtils.a lib/libLLVMTarget.a lib/libLLVMAnalysis.a lib/libLLVMMCDisassembler.a /usr/lib/libedit.so lib/libLLVMProfileData.a lib/libLLVMSymbolize.a lib/libLLVMDebugInfoDWARF.a lib/libLLVMDebugInfoPDB.a lib/libLLVMDebugInfoMSF.a lib/libLLVMDebugInfoBTF.a lib/libLLVMOption.a lib/libLLVMObject.a lib/libLLVMIRReader.a lib/libLLVMAsmParser.a lib/libLLVMBitReader.a lib/libLLVMCore.a lib/libLLVMRemarks.a lib/libLLVMBitstreamReader.a lib/libLLVMMCParser.a lib/libLLVMMC.a lib/libLLVMDebugInfoCodeView.a lib/libLLVMTextAPI.a lib/libLLVMBinaryFormat.a lib/libLLVMTargetParser.a lib/libLLVMSupport.a lib/libLLVMDemangle.a -lrt -ldl -lm /usr/lib/libz.so /usr/lib/libzstd.so /usr/lib/libtinfo.so /usr/lib/libxml2.so -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1/crtendS.o /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../lib64/crtn.o
#0 0x00007f6b21d0d407 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/bin/../lib/libLLVM-17git.so+0x330d407)
#1 0x00007f6b21d0d8cb (/usr/bin/../lib/libLLVM-17git.so+0x330d8cb)
#2 0x00007f6b1e221f10 (/usr/bin/../lib/libc.so.6+0x221f10)
#3 0x00007f6b1e28fbcd pthread_kill (/usr/bin/../lib/libc.so.6+0x28fbcd)
#4 0x00007f6b1e221e52 raise (/usr/bin/../lib/libc.so.6+0x221e52)
#5 0x00007f6b1e2004a0 abort (/usr/bin/../lib/libc.so.6+0x2004a0)
#6 0x00007f6b2170e83d llvm::report_fatal_error(llvm::Twine const&, bool) (/usr/bin/../lib/libLLVM-17git.so+0x2d0e83d)
#7 0x00007f6b20e4bc65 (/usr/bin/../lib/libLLVM-17git.so+0x244bc65)
#8 0x00007f6b219e20a5 (/usr/bin/../lib/libLLVM-17git.so+0x2fe20a5)
#9 0x00007f6b219e1fed (/usr/bin/../lib/libLLVM-17git.so+0x2fe1fed)
#10 0x00007f6b21586409 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/usr/bin/../lib/libLLVM-17git.so+0x2b86409)
#11 0x00007f6b23284b47 llvm::lto::opt(llvm::lto::Config const&, llvm::TargetMachine*, unsigned int, llvm::Module&, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*, std::vector<unsigned char, std::allocator<unsigned char>> const&) (/usr/bin/../lib/libLLVM-17git.so+0x4884b47)
#12 0x00007f6b23286064 llvm::lto::backend(llvm::lto::Config const&, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex&) (/usr/bin/../lib/libLLVM-17git.so+0x4886064)
#13 0x00007f6b219c9a67 llvm::lto::LTO::runRegularLTO(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>) (/usr/bin/../lib/libLLVM-17git.so+0x2fc9a67)
#14 0x00007f6b219c4290 llvm::lto::LTO::run(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, std::function<llvm::Expected<std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>> (unsigned int, llvm::StringRef, llvm::Twine const&)>) (/usr/bin/../lib/libLLVM-17git.so+0x2fc4290)
#15 0x00005630fb2f07b4 lld::elf::BitcodeCompiler::compile() (/usr/bin/ld.lld+0x4f07b4)
#16 0x00005630fb247205 lld::elf::LinkerDriver::link(llvm::opt::InputArgList&) (/usr/bin/ld.lld+0x447205)
#17 0x00005630fb236af9 lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) (/usr/bin/ld.lld+0x436af9)
#18 0x00005630fb234c18 lld::elf::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) (/usr/bin/ld.lld+0x434c18)
#19 0x00005630fb14fee1 lld::unsafeLldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>, bool) (/usr/bin/ld.lld+0x34fee1)
#20 0x00005630fb12677c lld_main(int, char**, llvm::ToolContext const&) (/usr/bin/ld.lld+0x32677c)
#21 0x00005630fb12662c main (/usr/bin/ld.lld+0x32662c)
#22 0x00007f6b1e201b07 (/usr/bin/../lib/libc.so.6+0x201b07)
#23 0x00007f6b1e201bc4 __libc_start_main (/usr/bin/../lib/libc.so.6+0x201bc4)
#24 0x00005630fb1293b1 _start (/usr/bin/ld.lld+0x3293b1)
clang++: error: unable to execute command: Aborted
clang++: error: linker command failed due to signal (use -v to see invocation)
This is all I could find in/tmp/makepkg/llvm-git/src/llvm-project/build/lib
that carries libomp.so
in its name after such a crash when using the polly-flags and thinLTO. I hope this helps.
libomp.so.0.0.preopt.bc.txt libomp.so.0.2.internalize.bc.txt libomp.so.0.4.opt.bc.txt libomp.so.0.5.precodegen.bc.txt libomp.so.index.bc.txt libomp.so.index.dot.txt libomp.so.resolution.txt
Hm, if it crashed in opt
I wouldn't assume there to be a precodegen.bc
file. The goal would be that you get an IR file that reproduces the error if you run it with opt file.ll -passes='lto<O3>'
with all the -mllvm
options.
Unfortunately I am starting at zero using opt or debugging such issues per se. With a little help of ChatGPT, I produced a libomp.ll with this command:
clang -Wl,--lto-O3,-O3,-Bsymbolic-functions,--as-needed -fcf-protection=none -mharden-sls=none -Wl,-mllvm,-polly -Wl,-mllvm,-polly-invariant-load-hoisting -Wl,-mllvm -Wl,-polly-loopfusion-greedy -Wl,-mllvm -Wl,-polly-run-inliner -Wl,-mllvm -Wl,-polly-run-dce -Wl,-mllvm -Wl,-polly-enable-delicm=true -Wl,-mllvm -Wl,-extra-vectorizer-passes -Wl,-mllvm -Wl,-enable-cond-stores-vec -Wl,-mllvm -Wl,-slp-vectorize-hor-store -Wl,-mllvm -Wl,-enable-loopinterchange -Wl,-mllvm -Wl,-enable-loop-distribute -Wl,-mllvm -Wl,-enable-unroll-and-jam -Wl,-mllvm -Wl,-enable-loop-flatten -Wl,-mllvm -Wl,-interleave-small-loop-scalar-reduction -Wl,-mllvm -Wl,-unroll-runtime-multi-exit -Wl,-mllvm -Wl,-aggressive-ext-opt -Wl,-mllvm -Wl,-enable-interleaved-mem-accesses -Wl,-mllvm -Wl,-enable-masked-interleaved-mem-accesses -march=native -maes -mbmi2 -mpclmul -flto=thin -fwhole-program-vtables -fvisibility=hidden -fuse-ld=lld -Wl,-zmax-page-size=0x200000 -fprofile-instr-use=/home/marcus/Downloads/llvm17.profdata -freroll-loops -Wl,-mllvm -Wl,-adce-remove-loops -Wl,-mllvm -Wl,-enable-ext-tsp-block-placement=1 -Wl,-mllvm -Wl,-enable-gvn-hoist -Wl,-mllvm -Wl,-enable-dfa-jump-thread -Wl,--push-state -Wl,-whole-archive -ljemalloc_pic -Wl,--pop-state -lpthread -lstdc++ -lm -ldl -Wl,--save-temps -S -emit-llvm -o libomp.ll libomp.so.0.0.preopt.bc
If that is not what you are looking for, please guide me through each step with all neccessary details.
Here is another one with the CFLAGS added to the command from above:
Can you provide the build instructions that led you to the crash. i mean the cmake command line. the command you've pasted above doesn't error out.
~/g/llvm-project/build/bin/clang -Wl,--lto-O3,-O3,-Bsymbolic-functions,--as-needed -fcf-protection=none -mharden-sls=none -Wl,-mllvm,-polly -Wl,-mllvm,-polly-invariant-load-hoisting -Wl,-mllvm -Wl,-polly-loopfusion-greedy -Wl,-mllvm -Wl,-polly-run-inliner -Wl,-mllvm -Wl,-polly-run-dce -Wl,-mllvm -Wl,-polly-enable-delicm=true -Wl,-mllvm -Wl,-extra-vectorizer-passes -Wl,-mllvm -Wl,-enable-cond-stores-vec -Wl,-mllvm -Wl,-slp-vectorize-hor-store -Wl,-mllvm -Wl,-enable-loopinterchange -Wl,-mllvm -Wl,-enable-loop-distribute -Wl,-mllvm -Wl,-enable-unroll-and-jam -Wl,-mllvm -Wl,-enable-loop-flatten -Wl,-mllvm -Wl,-interleave-small-loop-scalar-reduction -Wl,-mllvm -Wl,-unroll-runtime-multi-exit -Wl,-mllvm -Wl,-aggressive-ext-opt -Wl,-mllvm -Wl,-enable-interleaved-mem-accesses -Wl,-mllvm -Wl,-enable-masked-interleaved-mem-accesses -march=native -maes -mbmi2 -mpclmul -flto=thin -fwhole-program-vtables -fvisibility=hidden -fuse-ld=lld -Wl,-zmax-page-size=0x200000 -fprofile-instr-use=/home/marcus/Downloads/llvm17.profdata -freroll-loops -Wl,-mllvm -Wl,-adce-remove-loops -Wl,-mllvm -Wl,-enable-ext-tsp-block-placement=1 -Wl,-mllvm -Wl,-enable-gvn-hoist -Wl,-mllvm -Wl,-enable-dfa-jump-thread -Wl,--push-state -Wl,-whole-archive -ljemalloc_pic -Wl,--pop-state -lpthread -lstdc++ -lm -ldl -Wl,--save-temps -S -emit-llvm -o libomp.ll libomp_with_CFLAGS.ll
error: Error in reading profile /home/marcus/Downloads/llvm17.profdata: No such file or directory
Were you able to crash the compiler with the above command?
When i remove the profdata from command line
~/g/llvm-project/build/bin/clang -Wl,--lto-O3,-O3,-Bsymbolic-functions,--as-needed -fcf-protection=none -mharden-sls=none -Wl,-mllvm,-polly -Wl,-mllvm,-polly-invariant-load-hoisting -Wl,-mllvm -Wl,-polly-loopfusion-greedy -Wl,-mllvm -Wl,-polly-run-inliner -Wl,-mllvm -Wl,-polly-run-dce -Wl,-mllvm -Wl,-polly-enable-delicm=true -Wl,-mllvm -Wl,-extra-vectorizer-passes -Wl,-mllvm -Wl,-enable-cond-stores-vec -Wl,-mllvm -Wl,-slp-vectorize-hor-store -Wl,-mllvm -Wl,-enable-loopinterchange -Wl,-mllvm -Wl,-enable-loop-distribute -Wl,-mllvm -Wl,-enable-unroll-and-jam -Wl,-mllvm -Wl,-enable-loop-flatten -Wl,-mllvm -Wl,-interleave-small-loop-scalar-reduction -Wl,-mllvm -Wl,-unroll-runtime-multi-exit -Wl,-mllvm -Wl,-aggressive-ext-opt -Wl,-mllvm -Wl,-enable-interleaved-mem-accesses -Wl,-mllvm -Wl,-enable-masked-interleaved-mem-accesses -march=native -maes -mbmi2 -mpclmul -flto=thin -fwhole-program-vtables -fvisibility=hidden -fuse-ld=lld -Wl,-zmax-page-size=0x200000 -freroll-loops -Wl,-mllvm -Wl,-adce-remove-loops -Wl,-mllvm -Wl,-enable-ext-tsp-block-placement=1 -Wl,-mllvm -Wl,-enable-gvn-hoist -Wl,-mllvm -Wl,-enable-dfa-jump-thread -Wl,--push-state -Wl,-whole-archive -ljemalloc_pic -Wl,--pop-state -lpthread -lstdc++ -lm -ldl -Wl,--save-temps -S -emit-llvm -o libomp.ll libomp_with_CFLAGS.ll
There is no compiler error i get.
Can you provide the build instructions that led you to the crash. i mean the cmake command line. the command you've pasted above doesn't error out.
This is the PKGBUILD that used to re-produce the issue for me on CachyOS (Arch-Linux derivative).
Extracted from that, this is the cmake command line:
cmake -S llvm -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLLVM_BINUTILS_INCDIR=/usr/include \
-DFFI_INCLUDE_DIR=$(pkg-config --variable=includedir libffi) \
-DLLVM_HOST_TRIPLE=$CHOST \
-DLLVM_DEFAULT_TARGET_TRIPLE="x86_64-pc-linux-gnu" \
-DLLVM_BUILD_RUNTIME=ON \
-DLLVM_BUILD_LLVM_DYLIB=ON \
-DLLVM_LINK_LLVM_DYLIB=ON \
-DCLANG_LINK_CLANG_DYLIB=ON \
-DLLVM_DYLIB_COMPONENTS="all" \
-DLLVM_INSTALL_UTILS=ON \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_ENABLE_FFI=ON \
-DLLVM_ENABLE_BINDINGS=OFF \
-DCMAKE_C_FLAGS="$CFLAGS -g0 -Wp,-D_FORTIFY_SOURCE=0" \
-DCMAKE_CXX_FLAGS="$CXXFLAGS -g0 -Wp,-D_FORTIFY_SOURCE=0" \
-DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS" \
-DCMAKE_MODULE_LINKER_FLAGS="$LDFLAGS" \
-DCMAKE_SHARED_LINKER_FLAGS="$LDFLAGS" \
-DLLVM_INCLUDE_BENCHMARKS=OFF \
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_INCLUDE_EXAMPLES=OFF \
-DLLVM_BUILD_DOCS=OFF \
-DLLVM_INCLUDE_DOCS=OFF \
-DLLVM_ENABLE_OCAMLDOC=OFF \
-DLLVM_ENABLE_LTO=FULL \
-DLLVM_ENABLE_SPHINX=OFF \
-DLLVM_ENABLE_DOXYGEN=OFF \
-DLLVM_POLLY_LINK_INTO_TOOLS=ON \
-DLLVM_TARGETS_TO_BUILD="AMDGPU;X86;BPF" \
-DLLVM_ENABLE_PROJECTS="clang;lld;polly;openmp;compiler-rt" \
-D LLVM_ENABLE_ZLIB=ON \
-D LLVM_ENABLE_ZSTD=ON \
-D LIBCLANG_BUILD_STATIC=ON \
-DLIBOMP_INSTALL_ALIASES=ON \
-DLIBOMP_ENABLE_SHARED=ON \
-DOPENMP_ENABLE_LIBOMP_PROFILING=OFF \
-DOPENMP_ENABLE_LIBOMPTARGET_PROFILING=OFF \
-DLIBOMP_ENABLE_RTTI=OFF \
-DLIBOMP_OMPT_SUPPORT=OFF \
-DLLVM_INSTALL_TOOLCHAIN_ONLY=OFF \
-DCLANG_DEFAULT_PIE_ON_LINUX=OFF \
"${_extra_build_flags[@]}"
ninja -C build
Here is the zipped PGO-Profile: llvm17.profdata.zip
By the way, I've just re-checked with the problematic set of flags from the comment above .
This issue is still reproducible for me with that PKGBUILD on current llvm-git main with clang 18.0.0 (69b19f284836f6059355167f904a2ab9f4b96992) as host compiler (I haven't re-named the directory where the host compiler is located, so don't be confused that the directory is still named llvm17 below).
[2042/6399] Linking C shared library lib/libomp.so
FAILED: lib/libomp.so
: && /home/marcus/llvm17/bin/clang -fPIC -O3 -march=native -mtune=native -maes -mbmi2 -mpclmul -mllvm -inline-threshold=1000 -mllvm -polly -mllvm -polly-position=early -mllvm -polly-invariant-load-hoisting -mllvm -polly-loopfusion-greedy -mllvm -polly-run-inliner -mllvm -polly-run-dce -mllvm -polly-enable-delicm=true -mllvm -extra-vectorizer-passes -mllvm -enable-cond-stores-vec -mllvm -slp-vectorize-hor-store -mllvm -enable-loopinterchange -mllvm -enable-loop-distribute -mllvm -enable-unroll-and-jam -mllvm -enable-loop-flatten -mllvm -interleave-small-loop-scalar-reduction -mllvm -unroll-runtime-multi-exit -mllvm -aggressive-ext-opt -fno-math-errno -fno-trapping-math -falign-functions=32 -funroll-loops -fno-semantic-interposition -fcf-protection=none -mharden-sls=none -fomit-frame-pointer -mprefer-vector-width=256 -flto=thin -fwhole-program-vtables -fvisibility=hidden -freroll-loops -mllvm -adce-remove-loops -mllvm -enable-ext-tsp-block-placement=1 -mllvm -enable-gvn-hoist -mllvm -enable-dfa-jump-thread -fprofile-instr-use=/home/marcus/Downloads/llvm17.profdata -g0 -Wp,-D_FORTIFY_SOURCE=0 -fPIC -fno-semantic-interposition -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-comment -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -flto=full -Wall -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-enum-constexpr-conversion -Wno-extra -Wno-pedantic -O3 -DNDEBUG -Wl,--lto-O3,-O3,-Bsymbolic-functions,--as-needed -fcf-protection=none -mharden-sls=none -Wl,-mllvm,-polly -Wl,-mllvm,-polly-invariant-load-hoisting -Wl,-mllvm -Wl,-polly-loopfusion-greedy -Wl,-mllvm -Wl,-polly-run-inliner -Wl,-mllvm -Wl,-polly-run-dce -Wl,-mllvm -Wl,-polly-enable-delicm=true -Wl,-mllvm -Wl,-extra-vectorizer-passes -Wl,-mllvm -Wl,-enable-cond-stores-vec -Wl,-mllvm -Wl,-slp-vectorize-hor-store -Wl,-mllvm -Wl,-enable-loopinterchange -Wl,-mllvm -Wl,-enable-loop-distribute -Wl,-mllvm -Wl,-enable-unroll-and-jam -Wl,-mllvm -Wl,-enable-loop-flatten -Wl,-mllvm -Wl,-interleave-small-loop-scalar-reduction -Wl,-mllvm -Wl,-unroll-runtime-multi-exit -Wl,-mllvm -Wl,-aggressive-ext-opt -Wl,-mllvm -Wl,-enable-interleaved-mem-accesses -Wl,-mllvm -Wl,-enable-masked-interleaved-mem-accesses -march=native -maes -mbmi2 -mpclmul -flto=thin -fwhole-program-vtables -fvisibility=hidden -fuse-ld=lld -Wl,-zmax-page-size=0x200000 -fprofile-instr-use=/home/marcus/Downloads/llvm17.profdata -freroll-loops -Wl,-mllvm -Wl,-adce-remove-loops -Wl,-mllvm -Wl,-enable-ext-tsp-block-placement=1 -Wl,-mllvm -Wl,-enable-gvn-hoist -Wl,-mllvm -Wl,-enable-dfa-jump-thread -Wl,--push-state -Wl,-whole-archive -ljemalloc_pic -Wl,--pop-state -lpthread -lstdc++ -lm -ldl -Wl,-z,defs -Wl,-z,nodelete -Wl,--color-diagnostics -flto=full -Wl,--as-needed -Wl,--version-script=/tmp/makepkg/llvm-git/src/llvm-project/openmp/runtime/src/exports_so.txt -static-libgcc -Wl,-z,noexecstack -shared -Wl,-soname,libomp.so -o lib/libomp.so projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_alloc.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_atomic.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_csupport.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_debug.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_itt.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_environment.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_error.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_global.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_i18n.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_io.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_runtime.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_settings.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_str.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_tasking.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_threadprivate.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_utility.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_barrier.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_wait_release.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_dispatch.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_lock.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_sched.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_collapse.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/z_Linux_util.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_gsupport.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/thirdparty/ittnotify/ittnotify_static.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_taskdeps.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_cancel.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_ftn_cdecl.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_ftn_extra.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_version.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/z_Linux_asm.S.o -lm -ldl && cd /tmp/makepkg/llvm-git/src/llvm-project/build/lib && /usr/bin/cmake -E create_symlink libomp.so libgomp.so && /usr/bin/cmake -E create_symlink libomp.so libiomp5.so
clang: warning: argument unused during compilation: '-mllvm -inline-threshold=1000' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -polly' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -polly-position=early' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -polly-invariant-load-hoisting' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -polly-loopfusion-greedy' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -polly-run-inliner' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -polly-run-dce' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -polly-enable-delicm=true' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -extra-vectorizer-passes' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -enable-cond-stores-vec' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -slp-vectorize-hor-store' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -enable-loopinterchange' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -enable-loop-distribute' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -enable-unroll-and-jam' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -enable-loop-flatten' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -interleave-small-loop-scalar-reduction' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -unroll-runtime-multi-exit' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -aggressive-ext-opt' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -adce-remove-loops' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -enable-ext-tsp-block-placement=1' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -enable-gvn-hoist' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -enable-dfa-jump-thread' [-Wunused-command-line-argument]
Instruction does not dominate all uses!
%517 = add nsw i32 %377, 1
%519 = phi i32 [ %517, %516 ], [ %377, %376 ], [ %517, %593 ]
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.
Stack dump:
0. Program arguments: /home/marcus/llvm17/bin/ld.lld --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -shared -o lib/libomp.so /usr/lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-pc-linux-gnu/13.2.1/crtbeginS.o -L/home/marcus/llvm17/lib/clang/18/lib/x86_64-pc-linux-gnu -L/usr/lib64/gcc/x86_64-pc-linux-gnu/13.2.1 -L/usr/lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/lib -L/usr/lib -plugin-opt=mcpu=haswell -plugin-opt=O3 -plugin-opt=-function-sections=1 -plugin-opt=-data-sections=1 -plugin-opt=cs-profile-path=/home/marcus/Downloads/llvm17.profdata --lto-O3 -O3 -Bsymbolic-functions --as-needed -mllvm -polly -mllvm -polly-invariant-load-hoisting -mllvm -polly-loopfusion-greedy -mllvm -polly-run-inliner -mllvm -polly-run-dce -mllvm -polly-enable-delicm=true -mllvm -extra-vectorizer-passes -mllvm -enable-cond-stores-vec -mllvm -slp-vectorize-hor-store -mllvm -enable-loopinterchange -mllvm -enable-loop-distribute -mllvm -enable-unroll-and-jam -mllvm -enable-loop-flatten -mllvm -interleave-small-loop-scalar-reduction -mllvm -unroll-runtime-multi-exit -mllvm -aggressive-ext-opt -mllvm -enable-interleaved-mem-accesses -mllvm -enable-masked-interleaved-mem-accesses -zmax-page-size=0x200000 -mllvm -adce-remove-loops -mllvm -enable-ext-tsp-block-placement=1 -mllvm -enable-gvn-hoist -mllvm -enable-dfa-jump-thread --push-state -whole-archive -ljemalloc_pic --pop-state -lpthread -lstdc++ -lm -ldl -z defs -z nodelete --color-diagnostics --as-needed --version-script=/tmp/makepkg/llvm-git/src/llvm-project/openmp/runtime/src/exports_so.txt -z noexecstack -soname libomp.so projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_alloc.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_atomic.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_csupport.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_debug.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_itt.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_environment.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_error.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_global.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_i18n.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_io.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_runtime.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_settings.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_str.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_tasking.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_threadprivate.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_utility.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_barrier.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_wait_release.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_dispatch.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_lock.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_sched.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_collapse.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/z_Linux_util.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_gsupport.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/thirdparty/ittnotify/ittnotify_static.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_taskdeps.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_cancel.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_ftn_cdecl.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_ftn_extra.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_version.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/z_Linux_asm.S.o -lm -ldl -lgcc -lgcc_eh -lc -lgcc -lgcc_eh /usr/lib64/gcc/x86_64-pc-linux-gnu/13.2.1/crtendS.o /usr/lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/crtn.o
#0 0x000055e8bc441207 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/marcus/llvm17/bin/ld.lld+0x3041207)
#1 0x000055e8bc44169d SignalHandler(int) Signals.cpp:0:0
#2 0x00007f17dda23010 (/usr/lib/libc.so.6+0x223010)
#3 0x00007f17dda910ed pthread_kill (/usr/lib/libc.so.6+0x2910ed)
#4 0x00007f17dda22f52 gsignal (/usr/lib/libc.so.6+0x222f52)
#5 0x00007f17dda004a0 abort (/usr/lib/libc.so.6+0x2004a0)
#6 0x000055e8bb4e971d llvm::report_fatal_error(llvm::Twine const&, bool) (/home/marcus/llvm17/bin/ld.lld+0x20e971d)
#7 0x000055e8bb3b4f85 (/home/marcus/llvm17/bin/ld.lld+0x1fb4f85)
#8 0x000055e8bc003065 (/home/marcus/llvm17/bin/ld.lld+0x2c03065)
#9 0x000055e8bc002fad llvm::detail::PassModel<llvm::Module, llvm::VerifierPass, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) LTOBackend.cpp:0:0
#10 0x000055e8bbae5aa9 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/marcus/llvm17/bin/ld.lld+0x26e5aa9)
#11 0x000055e8bd206867 llvm::lto::opt(llvm::lto::Config const&, llvm::TargetMachine*, unsigned int, llvm::Module&, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*, std::vector<unsigned char, std::allocator<unsigned char>> const&) (/home/marcus/llvm17/bin/ld.lld+0x3e06867)
#12 0x000055e8bd207d3b llvm::lto::backend(llvm::lto::Config const&, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex&) (/home/marcus/llvm17/bin/ld.lld+0x3e07d3b)
#13 0x000055e8bbfa74c7 llvm::lto::LTO::runRegularLTO(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>) (/home/marcus/llvm17/bin/ld.lld+0x2ba74c7)
#14 0x000055e8bbfa55b0 llvm::lto::LTO::run(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, std::function<llvm::Expected<std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>> (unsigned int, llvm::StringRef, llvm::Twine const&)>) (/home/marcus/llvm17/bin/ld.lld+0x2ba55b0)
#15 0x000055e8bc618957 lld::elf::BitcodeCompiler::compile() (/home/marcus/llvm17/bin/ld.lld+0x3218957)
#16 0x000055e8bc55a234 lld::elf::LinkerDriver::link(llvm::opt::InputArgList&) (/home/marcus/llvm17/bin/ld.lld+0x315a234)
#17 0x000055e8bc546aca lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) (/home/marcus/llvm17/bin/ld.lld+0x3146aca)
#18 0x000055e8bc5445c3 lld::elf::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) (/home/marcus/llvm17/bin/ld.lld+0x31445c3)
#19 0x000055e8bc442863 lld::unsafeLldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>, bool) (/home/marcus/llvm17/bin/ld.lld+0x3042863)
#20 0x000055e8bbe3454e lld_main(int, char**, llvm::ToolContext const&) (/home/marcus/llvm17/bin/ld.lld+0x2a3454e)
#21 0x000055e8bbe342cc main (/home/marcus/llvm17/bin/ld.lld+0x2a342cc)
#22 0x00007f17dda01f47 (/usr/lib/libc.so.6+0x201f47)
#23 0x00007f17dda02004 __libc_start_main (/usr/lib/libc.so.6+0x202004)
#24 0x000055e8bc3b1361 _start (/home/marcus/llvm17/bin/ld.lld+0x2fb1361)
clang: error: unable to execute command: Aborted
clang: error: linker command failed due to signal (use -v to see invocation)
With -g2 and Debug set:
Stack dump:
0. Program arguments: /home/marcus/llvm17/bin/ld.lld --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -shared -o lib/libomp.so /usr/lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-pc-linux-gnu/13.2.1/crtbeginS.o -L/home/marcus/llvm17/lib/clang/18/lib/x86_64-pc-linux-gnu -L/usr/lib64/gcc/x86_64-pc-linux-gnu/13.2.1 -L/usr/lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/lib -L/usr/lib -plugin-opt=mcpu=haswell -plugin-opt=O3 -plugin-opt=cs-profile-path=/home/marcus/Downloads/llvm17.profdata --save-temps --lto-O3 -O3 -Bsymbolic-functions --as-needed -mllvm -polly -mllvm -polly-invariant-load-hoisting -mllvm -polly-loopfusion-greedy -mllvm -polly-run-inliner -mllvm -polly-run-dce -mllvm -polly-enable-delicm=true -mllvm -extra-vectorizer-passes -mllvm -enable-cond-stores-vec -mllvm -slp-vectorize-hor-store -mllvm -enable-loopinterchange -mllvm -enable-loop-distribute -mllvm -enable-unroll-and-jam -mllvm -enable-loop-flatten -mllvm -interleave-small-loop-scalar-reduction -mllvm -unroll-runtime-multi-exit -mllvm -aggressive-ext-opt -mllvm -enable-interleaved-mem-accesses -mllvm -enable-masked-interleaved-mem-accesses -zmax-page-size=0x200000 -mllvm -adce-remove-loops -mllvm -enable-ext-tsp-block-placement=1 -mllvm -enable-gvn-hoist -mllvm -enable-dfa-jump-thread --push-state -whole-archive -ljemalloc_pic --pop-state -lpthread -lstdc++ -lm -ldl -z defs -z nodelete --color-diagnostics --as-needed --version-script=/tmp/makepkg/llvm-git/src/llvm-project/openmp/runtime/src/exports_so.txt -z noexecstack -soname libomp.so projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_alloc.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_atomic.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_csupport.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_debug.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_itt.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_environment.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_error.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_global.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_i18n.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_io.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_runtime.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_settings.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_str.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_tasking.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_threadprivate.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_utility.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_barrier.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_wait_release.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_dispatch.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_lock.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_sched.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_collapse.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/z_Linux_util.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_gsupport.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/thirdparty/ittnotify/ittnotify_static.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_taskdeps.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_cancel.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_ftn_cdecl.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_ftn_extra.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_version.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/z_Linux_asm.S.o -lm -ldl -lgcc -lgcc_eh -lc -lgcc -lgcc_eh /usr/lib64/gcc/x86_64-pc-linux-gnu/13.2.1/crtendS.o /usr/lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/crtn.o
#0 0x0000559a75241207 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/marcus/llvm17/bin/ld.lld+0x3041207)
#1 0x0000559a7524169d SignalHandler(int) Signals.cpp:0:0
#2 0x00007f2aa3a23010 (/usr/lib/libc.so.6+0x223010)
#3 0x00007f2aa3a910ed pthread_kill (/usr/lib/libc.so.6+0x2910ed)
#4 0x00007f2aa3a22f52 gsignal (/usr/lib/libc.so.6+0x222f52)
#5 0x00007f2aa3a004a0 abort (/usr/lib/libc.so.6+0x2004a0)
#6 0x0000559a742e971d llvm::report_fatal_error(llvm::Twine const&, bool) (/home/marcus/llvm17/bin/ld.lld+0x20e971d)
#7 0x0000559a741b4f85 (/home/marcus/llvm17/bin/ld.lld+0x1fb4f85)
#8 0x0000559a74e03065 (/home/marcus/llvm17/bin/ld.lld+0x2c03065)
#9 0x0000559a74e02fad llvm::detail::PassModel<llvm::Module, llvm::VerifierPass, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) LTOBackend.cpp:0:0
#10 0x0000559a748e5aa9 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/marcus/llvm17/bin/ld.lld+0x26e5aa9)
#11 0x0000559a76006867 llvm::lto::opt(llvm::lto::Config const&, llvm::TargetMachine*, unsigned int, llvm::Module&, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*, std::vector<unsigned char, std::allocator<unsigned char>> const&) (/home/marcus/llvm17/bin/ld.lld+0x3e06867)
#12 0x0000559a76007d3b llvm::lto::backend(llvm::lto::Config const&, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex&) (/home/marcus/llvm17/bin/ld.lld+0x3e07d3b)
#13 0x0000559a74da74c7 llvm::lto::LTO::runRegularLTO(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>) (/home/marcus/llvm17/bin/ld.lld+0x2ba74c7)
#14 0x0000559a74da55b0 llvm::lto::LTO::run(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, std::function<llvm::Expected<std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>> (unsigned int, llvm::StringRef, llvm::Twine const&)>) (/home/marcus/llvm17/bin/ld.lld+0x2ba55b0)
#15 0x0000559a75418957 lld::elf::BitcodeCompiler::compile() (/home/marcus/llvm17/bin/ld.lld+0x3218957)
#16 0x0000559a7535a234 lld::elf::LinkerDriver::link(llvm::opt::InputArgList&) (/home/marcus/llvm17/bin/ld.lld+0x315a234)
#17 0x0000559a75346aca lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) (/home/marcus/llvm17/bin/ld.lld+0x3146aca)
#18 0x0000559a753445c3 lld::elf::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) (/home/marcus/llvm17/bin/ld.lld+0x31445c3)
#19 0x0000559a75242863 lld::unsafeLldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>, bool) (/home/marcus/llvm17/bin/ld.lld+0x3042863)
#20 0x0000559a74c3454e lld_main(int, char**, llvm::ToolContext const&) (/home/marcus/llvm17/bin/ld.lld+0x2a3454e)
#21 0x0000559a74c342cc main (/home/marcus/llvm17/bin/ld.lld+0x2a342cc)
#22 0x00007f2aa3a01f47 (/usr/lib/libc.so.6+0x201f47)
#23 0x00007f2aa3a02004 __libc_start_main (/usr/lib/libc.so.6+0x202004)
#24 0x0000559a751b1361 _start (/home/marcus/llvm17/bin/ld.lld+0x2fb1361)
Output with the original flags adjusted to -flto=thin -g2
:
[2035/6399] Linking C shared library lib/libomp.so
FAILED: lib/libomp.so
: && /home/marcus/llvm17/bin/clang -fPIC -O3 -march=native -mtune=native -maes -mbmi2 -mpclmul -mllvm -inline-threshold=1000 -mllvm -polly -mllvm -polly-position=early -mllvm -polly-invariant-load-hoisting -mllvm -polly-loopfusion-greedy -mllvm -polly-run-inliner -mllvm -polly-run-dce -mllvm -polly-enable-delicm=true -mllvm -extra-vectorizer-passes -mllvm -enable-cond-stores-vec -mllvm -slp-vectorize-hor-store -mllvm -enable-loopinterchange -mllvm -enable-loop-distribute -mllvm -enable-unroll-and-jam -mllvm -enable-loop-flatten -mllvm -interleave-small-loop-scalar-reduction -mllvm -unroll-runtime-multi-exit -mllvm -aggressive-ext-opt -fno-math-errno -fno-trapping-math -falign-functions=32 -funroll-loops -fno-semantic-interposition -fcf-protection=none -mharden-sls=none -fomit-frame-pointer -mprefer-vector-width=256 -flto=thin -fwhole-program-vtables -fvisibility=hidden -freroll-loops -mllvm -adce-remove-loops -mllvm -enable-ext-tsp-block-placement=1 -mllvm -enable-gvn-hoist -mllvm -enable-dfa-jump-thread -fprofile-instr-use=/home/marcus/Downloads/llvm17.profdata -Wl,--save-temps -g2 -Wp,-D_FORTIFY_SOURCE=0 -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wno-comment -fdiagnostics-color -Wall -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-enum-constexpr-conversion -Wno-extra -Wno-pedantic -O3 -DNDEBUG -Wl,--lto-O3,-O3,-Bsymbolic-functions,--as-needed -fcf-protection=none -mharden-sls=none -Wl,-mllvm,-polly -Wl,-mllvm,-polly-invariant-load-hoisting -Wl,-mllvm -Wl,-polly-loopfusion-greedy -Wl,-mllvm -Wl,-polly-run-inliner -Wl,-mllvm -Wl,-polly-run-dce -Wl,-mllvm -Wl,-polly-enable-delicm=true -Wl,-mllvm -Wl,-extra-vectorizer-passes -Wl,-mllvm -Wl,-enable-cond-stores-vec -Wl,-mllvm -Wl,-slp-vectorize-hor-store -Wl,-mllvm -Wl,-enable-loopinterchange -Wl,-mllvm -Wl,-enable-loop-distribute -Wl,-mllvm -Wl,-enable-unroll-and-jam -Wl,-mllvm -Wl,-enable-loop-flatten -Wl,-mllvm -Wl,-interleave-small-loop-scalar-reduction -Wl,-mllvm -Wl,-unroll-runtime-multi-exit -Wl,-mllvm -Wl,-aggressive-ext-opt -Wl,-mllvm -Wl,-enable-interleaved-mem-accesses -Wl,-mllvm -Wl,-enable-masked-interleaved-mem-accesses -march=native -maes -mbmi2 -mpclmul -flto=thin -fwhole-program-vtables -fvisibility=hidden -fuse-ld=lld -Wl,-zmax-page-size=0x200000 -fprofile-instr-use=/home/marcus/Downloads/llvm17.profdata -freroll-loops -Wl,-mllvm -Wl,-adce-remove-loops -Wl,-mllvm -Wl,-enable-ext-tsp-block-placement=1 -Wl,-mllvm -Wl,-enable-gvn-hoist -Wl,-mllvm -Wl,-enable-dfa-jump-thread -Wl,--push-state -Wl,-whole-archive -ljemalloc_pic -Wl,--pop-state -lpthread -lstdc++ -lm -ldl -Wl,-z,defs -Wl,-z,nodelete -Wl,--color-diagnostics -Wl,--as-needed -Wl,--version-script=/tmp/makepkg/llvm-git/src/llvm-project/openmp/runtime/src/exports_so.txt -static-libgcc -Wl,-z,noexecstack -shared -Wl,-soname,libomp.so -o lib/libomp.so projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_alloc.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_atomic.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_csupport.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_debug.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_itt.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_environment.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_error.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_global.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_i18n.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_io.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_runtime.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_settings.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_str.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_tasking.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_threadprivate.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_utility.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_barrier.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_wait_release.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_dispatch.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_lock.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_sched.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_collapse.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/z_Linux_util.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_gsupport.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/thirdparty/ittnotify/ittnotify_static.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_taskdeps.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_cancel.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_ftn_cdecl.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_ftn_extra.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_version.cpp.o projects/openmp/runtime/src/CMakeFiles/omp.dir/z_Linux_asm.S.o -lm -ldl && cd /tmp/makepkg/llvm-git/src/llvm-project/build/lib && /usr/bin/cmake -E create_symlink libomp.so libgomp.so && /usr/bin/cmake -E create_symlink libomp.so libiomp5.so
clang: warning: argument unused during compilation: '-mllvm -inline-threshold=1000' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -polly' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -polly-position=early' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -polly-invariant-load-hoisting' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -polly-loopfusion-greedy' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -polly-run-inliner' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -polly-run-dce' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -polly-enable-delicm=true' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -extra-vectorizer-passes' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -enable-cond-stores-vec' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -slp-vectorize-hor-store' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -enable-loopinterchange' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -enable-loop-distribute' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -enable-unroll-and-jam' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -enable-loop-flatten' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -interleave-small-loop-scalar-reduction' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -unroll-runtime-multi-exit' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -aggressive-ext-opt' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -adce-remove-loops' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -enable-ext-tsp-block-placement=1' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -enable-gvn-hoist' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mllvm -enable-dfa-jump-thread' [-Wunused-command-line-argument]
Instruction does not dominate all uses!
%519 = add nsw i32 %379, 1, !dbg !15022
%521 = phi i32 [ %519, %518 ], [ %379, %378 ], [ %519, %595 ]
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.
#0 0x0000565074641207 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/marcus/llvm17/bin/ld.lld+0x3041207)
#1 0x000056507464169d SignalHandler(int) Signals.cpp:0:0
#2 0x00007f953c823010 (/usr/lib/libc.so.6+0x223010)
#3 0x00007f953c8910ed pthread_kill (/usr/lib/libc.so.6+0x2910ed)
#4 0x00007f953c822f52 gsignal (/usr/lib/libc.so.6+0x222f52)
#5 0x00007f953c8004a0 abort (/usr/lib/libc.so.6+0x2004a0)
#6 0x00005650736e971d llvm::report_fatal_error(llvm::Twine const&, bool) (/home/marcus/llvm17/bin/ld.lld+0x20e971d)
#7 0x00005650735b4f85 (/home/marcus/llvm17/bin/ld.lld+0x1fb4f85)
#8 0x0000565073fe4bb5 (/home/marcus/llvm17/bin/ld.lld+0x29e4bb5)
#9 0x0000565073fe4837 (anonymous namespace)::BitcodeReader::materializeModule() (.4ff5313a12ea47608d7a69a969676a8b) BitcodeReader.cpp:0:0
#10 0x0000565074084bd9 llvm::BitcodeModule::getModuleImpl(llvm::LLVMContext&, bool, bool, bool, llvm::ParserCallbacks) (/home/marcus/llvm17/bin/ld.lld+0x2a84bd9)
#11 0x000056507459241a llvm::BitcodeModule::parseModule(llvm::LLVMContext&, llvm::ParserCallbacks) (/home/marcus/llvm17/bin/ld.lld+0x2f9241a)
#12 0x00005650754027fb (anonymous namespace)::InProcessThinBackend::runThinLTOBackendThread(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, std::function<llvm::Expected<std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>> (unsigned int, llvm::StringRef, llvm::Twine const&)>, unsigned int, llvm::BitcodeModule, llvm::ModuleSummaryIndex&, llvm::DenseMap<llvm::StringRef, std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long>>, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long>>>> const&, llvm::DenseSet<llvm::ValueInfo, llvm::DenseMapInfo<llvm::ValueInfo, void>> const&, std::map<unsigned long, llvm::GlobalValue::LinkageTypes, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, llvm::GlobalValue::LinkageTypes>>> const&, llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*>> const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int>>, llvm::SmallVector<std::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>>&)::'lambda'(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>)::operator()(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>) const LTO.cpp:0:0
#13 0x0000565075402127 std::_Function_handler<void (), std::_Bind<(anonymous namespace)::InProcessThinBackend::start(unsigned int, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long>>, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long>>>> const&, llvm::DenseSet<llvm::ValueInfo, llvm::DenseMapInfo<llvm::ValueInfo, void>> const&, std::map<unsigned long, llvm::GlobalValue::LinkageTypes, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, llvm::GlobalValue::LinkageTypes>>> const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int>>, llvm::SmallVector<std::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>>&)::'lambda'(llvm::BitcodeModule, llvm::ModuleSummaryIndex&, llvm::DenseMap<llvm::StringRef, std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long>>, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long>>>> const&, llvm::DenseSet<llvm::ValueInfo, llvm::DenseMapInfo<llvm::ValueInfo, void>> const&, std::map<unsigned long, llvm::GlobalValue::LinkageTypes, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, llvm::GlobalValue::LinkageTypes>>> const&, llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*>> const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int>>, llvm::SmallVector<std::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>>&) (llvm::BitcodeModule, std::reference_wrapper<llvm::ModuleSummaryIndex>, std::reference_wrapper<llvm::DenseMap<llvm::StringRef, std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long>>, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long>>>> const>, std::reference_wrapper<llvm::DenseSet<llvm::ValueInfo, llvm::DenseMapInfo<llvm::ValueInfo, void>> const>, std::reference_wrapper<std::map<unsigned long, llvm::GlobalValue::LinkageTypes, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, llvm::GlobalValue::LinkageTypes>>> const>, std::reference_wrapper<llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*>> const>, std::reference_wrapper<llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int>>, llvm::SmallVector<std::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>>>)>>::_M_invoke(std::_Any_data const&) LTO.cpp:0:0
#14 0x0000565074312992 std::_Function_handler<void (), llvm::ThreadPool::createTaskAndFuture(std::function<void ()>)::'lambda'()>::_M_invoke(std::_Any_data const&) Writer.cpp:0:0
#15 0x000056507432d65f llvm::ThreadPool::processTasks(llvm::ThreadPoolTaskGroup*) (/home/marcus/llvm17/bin/ld.lld+0x2d2d65f)
#16 0x000056507432d481 void* llvm::thread::ThreadProxy<std::tuple<llvm::ThreadPool::grow(int)::$_0>>(void*) ThreadPool.cpp:0:0
#17 0x00007f953c88f152 (/usr/lib/libc.so.6+0x28f152)
#18 0x00007f953c948df8 (/usr/lib/libc.so.6+0x348df8)
clang: error: unable to execute command: Aborted
clang: error: linker command failed due to signal (use -v to see invocation)
Attaching the relevant ll-files of this particular run: libomp.so.0.0.preopt.bc.ll.txt libomp.so.0.4.opt.bc.ll.txt libomp.so.0.5.precodegen.bc.ll.txt
Do you have precompiled bitcode files somewhere? it could be that the compiler is unable to parse those bitcode files.
@hiraditya I am afraid, I do not have these.
While libomp.so seems to link okay now, I get similar traces with FullLTO using clang 18.0.0 (3ac4ba37c05a0c8de7e6db154768eadf2bdb5195), this time during linking of llvm-exegesis and lib/libLLVM-18git.so:
[5327/6419] Linking CXX executable bin/llvm-exegesis
FAILED: bin/llvm-exegesis
: && /usr/bin/clang++ -O3 -march=native -mtune=native -maes -mbmi2 -mpclmul -mllvm -inline-threshold=1000 -mllvm -extra-vectorizer-passes -mllvm -enable-cond-stores-vec -mllvm -slp-vectorize-hor-store -mllvm -enable-loopinterchange -mllvm -enable-loop-distribute -mllvm -enable-unroll-and-jam -mllvm -enable-loop-flatten -mllvm -interleave-small-loop-scalar-reduction -mllvm -unroll-runtime-multi-exit -mllvm -aggressive-ext-opt -fno-math-errno -fno-trapping-math -falign-functions=32 -funroll-loops -fno-semantic-interposition -fcf-protection=none -mharden-sls=none -fomit-frame-pointer -mprefer-vector-width=256 -flto -fwhole-program-vtables -freroll-loops -mllvm -adce-remove-loops -mllvm -enable-ext-tsp-block-placement=1 -mllvm -enable-gvn-hoist -mllvm -enable-dfa-jump-thread -Wno-error -fprofile-instr-use=/home/marcus/Downloads/llvm17.profdata -ffp-contract=fast -fsplit-lto-unit -fdata-sections -ffunction-sections -w -g0 -Wp,-D_FORTIFY_SOURCE=0 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-class-memaccess -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,--lto-CGO3 -Wl,--gc-sections -Wl,--icf=all -Wl,--lto-O3,-O3,-Bsymbolic-functions,--as-needed -fcf-protection=none -mharden-sls=none -Wl,-mllvm -Wl,-extra-vectorizer-passes -Wl,-mllvm -Wl,-enable-cond-stores-vec -Wl,-mllvm -Wl,-slp-vectorize-hor-store -Wl,-mllvm -Wl,-enable-loopinterchange -Wl,-mllvm -Wl,-enable-loop-distribute -Wl,-mllvm -Wl,-enable-unroll-and-jam -Wl,-mllvm -Wl,-enable-loop-flatten -Wl,-mllvm -Wl,-interleave-small-loop-scalar-reduction -Wl,-mllvm -Wl,-unroll-runtime-multi-exit -Wl,-mllvm -Wl,-aggressive-ext-opt -Wl,-mllvm -Wl,-enable-interleaved-mem-accesses -Wl,-mllvm -Wl,-enable-masked-interleaved-mem-accesses -march=native -maes -mbmi2 -mpclmul -flto -fwhole-program-vtables -fuse-ld=lld -Wl,-zmax-page-size=0x200000 -fprofile-instr-use=/home/marcus/Downloads/llvm17.profdata -freroll-loops -Wl,-mllvm -Wl,-adce-remove-loops -Wl,-mllvm -Wl,-enable-ext-tsp-block-placement=1 -Wl,-mllvm -Wl,-enable-gvn-hoist -Wl,-mllvm -Wl,-enable-dfa-jump-thread -Wl,--push-state -Wl,-whole-archive -ljemalloc_pic -Wl,--pop-state -lpthread -lstdc++ -lm -ldl -Wl,--undefined-version -Wl,--color-diagnostics -Wl,--gc-sections tools/llvm-exegesis/CMakeFiles/llvm-exegesis.dir/llvm-exegesis.cpp.o -o bin/llvm-exegesis -Wl,-rpath,"\$ORIGIN/../lib:" lib/libLLVMAMDGPUAsmParser.a lib/libLLVMX86AsmParser.a lib/libLLVMBPFAsmParser.a lib/libLLVMAMDGPUCodeGen.a lib/libLLVMX86CodeGen.a lib/libLLVMBPFCodeGen.a lib/libLLVMAMDGPUDesc.a lib/libLLVMX86Desc.a lib/libLLVMBPFDesc.a lib/libLLVMAMDGPUDisassembler.a lib/libLLVMX86Disassembler.a lib/libLLVMBPFDisassembler.a lib/libLLVMAMDGPUInfo.a lib/libLLVMX86Info.a lib/libLLVMBPFInfo.a lib/libLLVMCodeGenTypes.a lib/libLLVMMC.a lib/libLLVMMCParser.a lib/libLLVMSupport.a lib/libLLVMTargetParser.a lib/libLLVMExegesis.a lib/libLLVMExegesisX86.a lib/libLLVMMIRParser.a lib/libLLVMPasses.a lib/libLLVMCoroutines.a lib/libLLVMIRPrinter.a lib/libLLVMipo.a lib/libLLVMVectorize.a lib/libLLVMFrontendOpenMP.a lib/libLLVMLinker.a lib/libLLVMAMDGPUDesc.a lib/libLLVMAMDGPUInfo.a lib/libLLVMAMDGPUUtils.a lib/libLLVMX86AsmParser.a lib/libLLVMX86CodeGen.a lib/libLLVMAsmPrinter.a lib/libLLVMCFGuard.a lib/libLLVMInstrumentation.a lib/libLLVMX86Desc.a lib/libLLVMX86Disassembler.a lib/libLLVMX86Info.a lib/libLLVMExegesis.a lib/libLLVMGlobalISel.a lib/libLLVMSelectionDAG.a lib/libLLVMMCDisassembler.a lib/libLLVMMCA.a lib/libLLVMMCJIT.a lib/libLLVMExecutionEngine.a lib/libLLVMOrcTargetProcess.a lib/libLLVMOrcShared.a lib/libLLVMObjectYAML.a lib/libLLVMRuntimeDyld.a lib/libLLVMCodeGen.a lib/libLLVMCodeGenTypes.a lib/libLLVMScalarOpts.a lib/libLLVMAggressiveInstCombine.a lib/libLLVMInstCombine.a lib/libLLVMTarget.a lib/libLLVMBitWriter.a lib/libLLVMObjCARCOpts.a lib/libLLVMTransformUtils.a lib/libLLVMAnalysis.a lib/libLLVMProfileData.a lib/libLLVMSymbolize.a lib/libLLVMDebugInfoDWARF.a lib/libLLVMDebugInfoPDB.a lib/libLLVMDebugInfoMSF.a lib/libLLVMDebugInfoBTF.a lib/libLLVMObject.a lib/libLLVMMCParser.a lib/libLLVMMC.a lib/libLLVMDebugInfoCodeView.a lib/libLLVMIRReader.a lib/libLLVMBitReader.a lib/libLLVMAsmParser.a lib/libLLVMTextAPI.a lib/libLLVMCore.a lib/libLLVMBinaryFormat.a lib/libLLVMTargetParser.a lib/libLLVMRemarks.a lib/libLLVMBitstreamReader.a lib/libLLVMSupport.a -lrt -ldl -lm /usr/lib/libz.so /usr/lib/libzstd.so /usr/lib/libtinfo.so lib/libLLVMDemangle.a && :
Instruction does not dominate all uses!
%157 = icmp eq <2 x ptr> %156, %138
%155 = shufflevector <2 x i1> %157, <2 x i1> %154, <4 x i32> <i32 1, i32 0, i32 3, i32 2>
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.
Stack dump:
0. Program arguments: /usr/bin/ld.lld --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o bin/llvm-exegesis /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/crt1.o /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/crti.o /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/crtbegin.o -L/usr/lib/clang/18/lib/x86_64-pc-linux-gnu -L/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1 -L/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/lib -L/usr/lib -plugin-opt=mcpu=haswell -plugin-opt=O3 -plugin-opt=-function-sections=1 -plugin-opt=-data-sections=1 -plugin-opt=cs-profile-path=/home/marcus/Downloads/llvm17.profdata --lto-CGO3 --gc-sections --icf=all --lto-O3 -O3 -Bsymbolic-functions --as-needed -mllvm -extra-vectorizer-passes -mllvm -enable-cond-stores-vec -mllvm -slp-vectorize-hor-store -mllvm -enable-loopinterchange -mllvm -enable-loop-distribute -mllvm -enable-unroll-and-jam -mllvm -enable-loop-flatten -mllvm -interleave-small-loop-scalar-reduction -mllvm -unroll-runtime-multi-exit -mllvm -aggressive-ext-opt -mllvm -enable-interleaved-mem-accesses -mllvm -enable-masked-interleaved-mem-accesses -zmax-page-size=0x200000 -mllvm -adce-remove-loops -mllvm -enable-ext-tsp-block-placement=1 -mllvm -enable-gvn-hoist -mllvm -enable-dfa-jump-thread --push-state -whole-archive -ljemalloc_pic --pop-state -lpthread -lstdc++ -lm -ldl --undefined-version --color-diagnostics --gc-sections tools/llvm-exegesis/CMakeFiles/llvm-exegesis.dir/llvm-exegesis.cpp.o -rpath $ORIGIN/../lib: lib/libLLVMAMDGPUAsmParser.a lib/libLLVMX86AsmParser.a lib/libLLVMBPFAsmParser.a lib/libLLVMAMDGPUCodeGen.a lib/libLLVMX86CodeGen.a lib/libLLVMBPFCodeGen.a lib/libLLVMAMDGPUDesc.a lib/libLLVMX86Desc.a lib/libLLVMBPFDesc.a lib/libLLVMAMDGPUDisassembler.a lib/libLLVMX86Disassembler.a lib/libLLVMBPFDisassembler.a lib/libLLVMAMDGPUInfo.a lib/libLLVMX86Info.a lib/libLLVMBPFInfo.a lib/libLLVMCodeGenTypes.a lib/libLLVMMC.a lib/libLLVMMCParser.a lib/libLLVMSupport.a lib/libLLVMTargetParser.a lib/libLLVMExegesis.a lib/libLLVMExegesisX86.a lib/libLLVMMIRParser.a lib/libLLVMPasses.a lib/libLLVMCoroutines.a lib/libLLVMIRPrinter.a lib/libLLVMipo.a lib/libLLVMVectorize.a lib/libLLVMFrontendOpenMP.a lib/libLLVMLinker.a lib/libLLVMAMDGPUDesc.a lib/libLLVMAMDGPUInfo.a lib/libLLVMAMDGPUUtils.a lib/libLLVMX86AsmParser.a lib/libLLVMX86CodeGen.a lib/libLLVMAsmPrinter.a lib/libLLVMCFGuard.a lib/libLLVMInstrumentation.a lib/libLLVMX86Desc.a lib/libLLVMX86Disassembler.a lib/libLLVMX86Info.a lib/libLLVMExegesis.a lib/libLLVMGlobalISel.a lib/libLLVMSelectionDAG.a lib/libLLVMMCDisassembler.a lib/libLLVMMCA.a lib/libLLVMMCJIT.a lib/libLLVMExecutionEngine.a lib/libLLVMOrcTargetProcess.a lib/libLLVMOrcShared.a lib/libLLVMObjectYAML.a lib/libLLVMRuntimeDyld.a lib/libLLVMCodeGen.a lib/libLLVMCodeGenTypes.a lib/libLLVMScalarOpts.a lib/libLLVMAggressiveInstCombine.a lib/libLLVMInstCombine.a lib/libLLVMTarget.a lib/libLLVMBitWriter.a lib/libLLVMObjCARCOpts.a lib/libLLVMTransformUtils.a lib/libLLVMAnalysis.a lib/libLLVMProfileData.a lib/libLLVMSymbolize.a lib/libLLVMDebugInfoDWARF.a lib/libLLVMDebugInfoPDB.a lib/libLLVMDebugInfoMSF.a lib/libLLVMDebugInfoBTF.a lib/libLLVMObject.a lib/libLLVMMCParser.a lib/libLLVMMC.a lib/libLLVMDebugInfoCodeView.a lib/libLLVMIRReader.a lib/libLLVMBitReader.a lib/libLLVMAsmParser.a lib/libLLVMTextAPI.a lib/libLLVMCore.a lib/libLLVMBinaryFormat.a lib/libLLVMTargetParser.a lib/libLLVMRemarks.a lib/libLLVMBitstreamReader.a lib/libLLVMSupport.a -lrt -ldl -lm /usr/lib/libz.so /usr/lib/libzstd.so /usr/lib/libtinfo.so lib/libLLVMDemangle.a -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/crtend.o /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/crtn.o
#0 0x00007f5ca5617d08 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/bin/../lib/libLLVM-18git.so+0x3017d08)
#1 0x00007f5ca56182c1 (/usr/bin/../lib/libLLVM-18git.so+0x30182c1)
#2 0x00007f5ca1e23010 (/usr/bin/../lib/libc.so.6+0x223010)
#3 0x00007f5ca1e9160d pthread_kill (/usr/bin/../lib/libc.so.6+0x29160d)
#4 0x00007f5ca1e22f52 gsignal (/usr/bin/../lib/libc.so.6+0x222f52)
#5 0x00007f5ca1e004a0 abort (/usr/bin/../lib/libc.so.6+0x2004a0)
#6 0x00007f5ca49a919c llvm::report_fatal_error(llvm::Twine const&, bool) (/usr/bin/../lib/libLLVM-18git.so+0x23a919c)
#7 0x00007f5ca49fc2a5 (/usr/bin/../lib/libLLVM-18git.so+0x23fc2a5)
#8 0x00007f5ca52e6c45 (/usr/bin/../lib/libLLVM-18git.so+0x2ce6c45)
#9 0x00007f5ca52e6b8d (/usr/bin/../lib/libLLVM-18git.so+0x2ce6b8d)
#10 0x00007f5ca4f8737f llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/usr/bin/../lib/libLLVM-18git.so+0x298737f)
#11 0x00007f5ca6cf7823 llvm::lto::opt(llvm::lto::Config const&, llvm::TargetMachine*, unsigned int, llvm::Module&, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*, std::vector<unsigned char, std::allocator<unsigned char>> const&) (/usr/bin/../lib/libLLVM-18git.so+0x46f7823)
#12 0x00007f5ca6cf9b78 llvm::lto::backend(llvm::lto::Config const&, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex&) (/usr/bin/../lib/libLLVM-18git.so+0x46f9b78)
#13 0x00007f5ca527fba5 llvm::lto::LTO::runRegularLTO(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>) (/usr/bin/../lib/libLLVM-18git.so+0x2c7fba5)
#14 0x00007f5ca527e197 llvm::lto::LTO::run(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, std::function<llvm::Expected<std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>> (unsigned int, llvm::StringRef, llvm::Twine const&)>) (/usr/bin/../lib/libLLVM-18git.so+0x2c7e197)
#15 0x000055877dad2fbd lld::elf::BitcodeCompiler::compile() (/usr/bin/ld.lld+0x4d2fbd)
#16 0x000055877da34e07 lld::elf::LinkerDriver::link(llvm::opt::InputArgList&) (/usr/bin/ld.lld+0x434e07)
#17 0x000055877da22e65 lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) (/usr/bin/ld.lld+0x422e65)
#18 0x000055877da2127d lld::elf::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) (/usr/bin/ld.lld+0x42127d)
#19 0x000055877d93f0a7 lld::unsafeLldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>, bool) (/usr/bin/ld.lld+0x33f0a7)
#20 0x000055877d91cbb8 lld_main(int, char**, llvm::ToolContext const&) (/usr/bin/ld.lld+0x31cbb8)
#21 0x000055877d91c90c main (/usr/bin/ld.lld+0x31c90c)
#22 0x00007f5ca1e01f47 (/usr/bin/../lib/libc.so.6+0x201f47)
#23 0x00007f5ca1e02004 __libc_start_main (/usr/bin/../lib/libc.so.6+0x202004)
#24 0x000055877d91ec91 _start (/usr/bin/ld.lld+0x31ec91)
clang++: error: unable to execute command: Aborted
clang++: error: linker command failed due to signal (use -v to see invocation)
[5328/6419] Linking CXX shared library lib/libLLVM-18git.so
FAILED: lib/libLLVM-18git.so
: && /usr/bin/clang++ -fPIC -O3 -march=native -mtune=native -maes -mbmi2 -mpclmul -mllvm -inline-threshold=1000 -mllvm -extra-vectorizer-passes -mllvm -enable-cond-stores-vec -mllvm -slp-vectorize-hor-store -mllvm -enable-loopinterchange -mllvm -enable-loop-distribute -mllvm -enable-unroll-and-jam -mllvm -enable-loop-flatten -mllvm -interleave-small-loop-scalar-reduction -mllvm -unroll-runtime-multi-exit -mllvm -aggressive-ext-opt -fno-math-errno -fno-trapping-math -falign-functions=32 -funroll-loops -fno-semantic-interposition -fcf-protection=none -mharden-sls=none -fomit-frame-pointer -mprefer-vector-width=256 -flto -fwhole-program-vtables -freroll-loops -mllvm -adce-remove-loops -mllvm -enable-ext-tsp-block-placement=1 -mllvm -enable-gvn-hoist -mllvm -enable-dfa-jump-thread -Wno-error -fprofile-instr-use=/home/marcus/Downloads/llvm17.profdata -ffp-contract=fast -fsplit-lto-unit -fdata-sections -ffunction-sections -w -g0 -Wp,-D_FORTIFY_SOURCE=0 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-class-memaccess -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,--lto-CGO3 -Wl,--gc-sections -Wl,--icf=all -Wl,--lto-O3,-O3,-Bsymbolic-functions,--as-needed -fcf-protection=none -mharden-sls=none -Wl,-mllvm -Wl,-extra-vectorizer-passes -Wl,-mllvm -Wl,-enable-cond-stores-vec -Wl,-mllvm -Wl,-slp-vectorize-hor-store -Wl,-mllvm -Wl,-enable-loopinterchange -Wl,-mllvm -Wl,-enable-loop-distribute -Wl,-mllvm -Wl,-enable-unroll-and-jam -Wl,-mllvm -Wl,-enable-loop-flatten -Wl,-mllvm -Wl,-interleave-small-loop-scalar-reduction -Wl,-mllvm -Wl,-unroll-runtime-multi-exit -Wl,-mllvm -Wl,-aggressive-ext-opt -Wl,-mllvm -Wl,-enable-interleaved-mem-accesses -Wl,-mllvm -Wl,-enable-masked-interleaved-mem-accesses -march=native -maes -mbmi2 -mpclmul -flto -fwhole-program-vtables -fuse-ld=lld -Wl,-zmax-page-size=0x200000 -fprofile-instr-use=/home/marcus/Downloads/llvm17.profdata -freroll-loops -Wl,-mllvm -Wl,-adce-remove-loops -Wl,-mllvm -Wl,-enable-ext-tsp-block-placement=1 -Wl,-mllvm -Wl,-enable-gvn-hoist -Wl,-mllvm -Wl,-enable-dfa-jump-thread -Wl,--push-state -Wl,-whole-archive -ljemalloc_pic -Wl,--pop-state -lpthread -lstdc++ -lm -ldl -Wl,--undefined-version -Wl,-z,defs -Wl,-z,nodelete -Wl,--color-diagnostics -Wl,--gc-sections -Xlinker -Bsymbolic-functions -shared -Wl,-soname,libLLVM-18git.so -o lib/libLLVM-18git.so tools/llvm-shlib/CMakeFiles/LLVM.dir/libllvm.cpp.o -Wl,-rpath,"\$ORIGIN/../lib:" -Wl,--version-script,/tmp/makepkg/llvm-git/src/llvm-project/build/./lib/tools/llvm-shlib/simple_version_script.map -Wl,--whole-archive lib/libLLVMDemangle.a lib/libLLVMSupport.a lib/libLLVMCore.a lib/libLLVMFuzzerCLI.a lib/libLLVMFuzzMutate.a lib/libLLVMFileCheck.a lib/libLLVMInterfaceStub.a lib/libLLVMIRPrinter.a lib/libLLVMIRReader.a lib/libLLVMCodeGenTypes.a lib/libLLVMCodeGen.a lib/libLLVMSelectionDAG.a lib/libLLVMAsmPrinter.a lib/libLLVMMIRParser.a lib/libLLVMGlobalISel.a lib/libLLVMBinaryFormat.a lib/libLLVMBitReader.a lib/libLLVMBitWriter.a lib/libLLVMBitstreamReader.a lib/libLLVMDWARFLinker.a lib/libLLVMDWARFLinkerParallel.a lib/libLLVMExtensions.a lib/libLLVMFrontendHLSL.a lib/libLLVMFrontendOpenACC.a lib/libLLVMFrontendOpenMP.a lib/libLLVMTransformUtils.a lib/libLLVMInstrumentation.a lib/libLLVMAggressiveInstCombine.a lib/libLLVMInstCombine.a lib/libLLVMScalarOpts.a lib/libLLVMipo.a lib/libLLVMVectorize.a lib/libLLVMObjCARCOpts.a lib/libLLVMCoroutines.a lib/libLLVMCFGuard.a lib/libLLVMLinker.a lib/libLLVMAnalysis.a lib/libLLVMLTO.a lib/libLLVMMC.a lib/libLLVMMCParser.a lib/libLLVMMCDisassembler.a lib/libLLVMMCA.a lib/libLLVMObjCopy.a lib/libLLVMObject.a lib/libLLVMObjectYAML.a lib/libLLVMOption.a lib/libLLVMRemarks.a lib/libLLVMDebugInfoDWARF.a lib/libLLVMDebugInfoGSYM.a lib/libLLVMDebugInfoLogicalView.a lib/libLLVMDebugInfoMSF.a lib/libLLVMDebugInfoCodeView.a lib/libLLVMDebugInfoPDB.a lib/libLLVMSymbolize.a lib/libLLVMDebugInfoBTF.a lib/libLLVMDWP.a lib/libLLVMExecutionEngine.a lib/libLLVMInterpreter.a lib/libLLVMJITLink.a lib/libLLVMMCJIT.a lib/libLLVMOrcJIT.a lib/libLLVMOrcShared.a lib/libLLVMOrcTargetProcess.a lib/libLLVMRuntimeDyld.a lib/libLLVMTarget.a lib/libLLVMAMDGPUCodeGen.a lib/libLLVMAMDGPUAsmParser.a lib/libLLVMAMDGPUDisassembler.a lib/libLLVMAMDGPUTargetMCA.a lib/libLLVMAMDGPUDesc.a lib/libLLVMAMDGPUInfo.a lib/libLLVMAMDGPUUtils.a lib/libLLVMX86CodeGen.a lib/libLLVMX86AsmParser.a lib/libLLVMX86Disassembler.a lib/libLLVMX86TargetMCA.a lib/libLLVMX86Desc.a lib/libLLVMX86Info.a lib/libLLVMBPFCodeGen.a lib/libLLVMBPFAsmParser.a lib/libLLVMBPFDisassembler.a lib/libLLVMBPFDesc.a lib/libLLVMBPFInfo.a lib/libLLVMAsmParser.a lib/libLLVMLineEditor.a lib/libLLVMProfileData.a lib/libLLVMCoverage.a lib/libLLVMPasses.a lib/libLLVMTargetParser.a lib/libLLVMTextAPI.a lib/libLLVMDlltoolDriver.a lib/libLLVMLibDriver.a lib/libLLVMXRay.a lib/libLLVMWindowsDriver.a lib/libLLVMWindowsManifest.a -Wl,--no-whole-archive lib/libLLVMExtensions.a lib/libPolly.a lib/libPollyISL.a /usr/lib/libffi.so lib/libLLVMExecutionEngine.a lib/libLLVMJITLink.a lib/libLLVMOrcTargetProcess.a lib/libLLVMOrcShared.a lib/libLLVMRuntimeDyld.a lib/libLLVMMIRParser.a lib/libLLVMPasses.a lib/libLLVMIRPrinter.a lib/libLLVMCoroutines.a lib/libLLVMGlobalISel.a lib/libLLVMCFGuard.a lib/libLLVMMCA.a lib/libLLVMSelectionDAG.a lib/libLLVMAsmPrinter.a lib/libLLVMCodeGen.a lib/libLLVMCodeGenTypes.a lib/libLLVMObjCARCOpts.a lib/libLLVMipo.a lib/libLLVMBitWriter.a lib/libLLVMFrontendOpenMP.a lib/libLLVMInstrumentation.a lib/libLLVMScalarOpts.a lib/libLLVMAggressiveInstCombine.a lib/libLLVMInstCombine.a lib/libLLVMVectorize.a lib/libLLVMLinker.a lib/libLLVMTransformUtils.a lib/libLLVMTarget.a lib/libLLVMAnalysis.a lib/libLLVMMCDisassembler.a /usr/lib/libedit.so lib/libLLVMProfileData.a lib/libLLVMSymbolize.a lib/libLLVMDebugInfoDWARF.a lib/libLLVMDebugInfoPDB.a lib/libLLVMDebugInfoMSF.a lib/libLLVMDebugInfoBTF.a lib/libLLVMOption.a lib/libLLVMObject.a lib/libLLVMIRReader.a lib/libLLVMAsmParser.a lib/libLLVMBitReader.a lib/libLLVMCore.a lib/libLLVMRemarks.a lib/libLLVMBitstreamReader.a lib/libLLVMMCParser.a lib/libLLVMMC.a lib/libLLVMDebugInfoCodeView.a lib/libLLVMTextAPI.a lib/libLLVMBinaryFormat.a lib/libLLVMTargetParser.a lib/libLLVMSupport.a lib/libLLVMDemangle.a -lrt -ldl -lm /usr/lib/libz.so /usr/lib/libzstd.so /usr/lib/libtinfo.so /usr/lib/libxml2.so && :
Instruction does not dominate all uses!
%157 = icmp eq <2 x ptr> %156, %138
%155 = shufflevector <2 x i1> %157, <2 x i1> %154, <4 x i32> <i32 1, i32 0, i32 3, i32 2>
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.
Stack dump:
0. Program arguments: /usr/bin/ld.lld --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -shared -o lib/libLLVM-18git.so /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/crti.o /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/crtbeginS.o -L/usr/lib/clang/18/lib/x86_64-pc-linux-gnu -L/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1 -L/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/lib -L/usr/lib -plugin-opt=mcpu=haswell -plugin-opt=O3 -plugin-opt=-function-sections=1 -plugin-opt=-data-sections=1 -plugin-opt=cs-profile-path=/home/marcus/Downloads/llvm17.profdata --lto-CGO3 --gc-sections --icf=all --lto-O3 -O3 -Bsymbolic-functions --as-needed -mllvm -extra-vectorizer-passes -mllvm -enable-cond-stores-vec -mllvm -slp-vectorize-hor-store -mllvm -enable-loopinterchange -mllvm -enable-loop-distribute -mllvm -enable-unroll-and-jam -mllvm -enable-loop-flatten -mllvm -interleave-small-loop-scalar-reduction -mllvm -unroll-runtime-multi-exit -mllvm -aggressive-ext-opt -mllvm -enable-interleaved-mem-accesses -mllvm -enable-masked-interleaved-mem-accesses -zmax-page-size=0x200000 -mllvm -adce-remove-loops -mllvm -enable-ext-tsp-block-placement=1 -mllvm -enable-gvn-hoist -mllvm -enable-dfa-jump-thread --push-state -whole-archive -ljemalloc_pic --pop-state -lpthread -lstdc++ -lm -ldl --undefined-version -z defs -z nodelete --color-diagnostics --gc-sections -Bsymbolic-functions -soname libLLVM-18git.so tools/llvm-shlib/CMakeFiles/LLVM.dir/libllvm.cpp.o -rpath $ORIGIN/../lib: --version-script /tmp/makepkg/llvm-git/src/llvm-project/build/./lib/tools/llvm-shlib/simple_version_script.map --whole-archive lib/libLLVMDemangle.a lib/libLLVMSupport.a lib/libLLVMCore.a lib/libLLVMFuzzerCLI.a lib/libLLVMFuzzMutate.a lib/libLLVMFileCheck.a lib/libLLVMInterfaceStub.a lib/libLLVMIRPrinter.a lib/libLLVMIRReader.a lib/libLLVMCodeGenTypes.a lib/libLLVMCodeGen.a lib/libLLVMSelectionDAG.a lib/libLLVMAsmPrinter.a lib/libLLVMMIRParser.a lib/libLLVMGlobalISel.a lib/libLLVMBinaryFormat.a lib/libLLVMBitReader.a lib/libLLVMBitWriter.a lib/libLLVMBitstreamReader.a lib/libLLVMDWARFLinker.a lib/libLLVMDWARFLinkerParallel.a lib/libLLVMExtensions.a lib/libLLVMFrontendHLSL.a lib/libLLVMFrontendOpenACC.a lib/libLLVMFrontendOpenMP.a lib/libLLVMTransformUtils.a lib/libLLVMInstrumentation.a lib/libLLVMAggressiveInstCombine.a lib/libLLVMInstCombine.a lib/libLLVMScalarOpts.a lib/libLLVMipo.a lib/libLLVMVectorize.a lib/libLLVMObjCARCOpts.a lib/libLLVMCoroutines.a lib/libLLVMCFGuard.a lib/libLLVMLinker.a lib/libLLVMAnalysis.a lib/libLLVMLTO.a lib/libLLVMMC.a lib/libLLVMMCParser.a lib/libLLVMMCDisassembler.a lib/libLLVMMCA.a lib/libLLVMObjCopy.a lib/libLLVMObject.a lib/libLLVMObjectYAML.a lib/libLLVMOption.a lib/libLLVMRemarks.a lib/libLLVMDebugInfoDWARF.a lib/libLLVMDebugInfoGSYM.a lib/libLLVMDebugInfoLogicalView.a lib/libLLVMDebugInfoMSF.a lib/libLLVMDebugInfoCodeView.a lib/libLLVMDebugInfoPDB.a lib/libLLVMSymbolize.a lib/libLLVMDebugInfoBTF.a lib/libLLVMDWP.a lib/libLLVMExecutionEngine.a lib/libLLVMInterpreter.a lib/libLLVMJITLink.a lib/libLLVMMCJIT.a lib/libLLVMOrcJIT.a lib/libLLVMOrcShared.a lib/libLLVMOrcTargetProcess.a lib/libLLVMRuntimeDyld.a lib/libLLVMTarget.a lib/libLLVMAMDGPUCodeGen.a lib/libLLVMAMDGPUAsmParser.a lib/libLLVMAMDGPUDisassembler.a lib/libLLVMAMDGPUTargetMCA.a lib/libLLVMAMDGPUDesc.a lib/libLLVMAMDGPUInfo.a lib/libLLVMAMDGPUUtils.a lib/libLLVMX86CodeGen.a lib/libLLVMX86AsmParser.a lib/libLLVMX86Disassembler.a lib/libLLVMX86TargetMCA.a lib/libLLVMX86Desc.a lib/libLLVMX86Info.a lib/libLLVMBPFCodeGen.a lib/libLLVMBPFAsmParser.a lib/libLLVMBPFDisassembler.a lib/libLLVMBPFDesc.a lib/libLLVMBPFInfo.a lib/libLLVMAsmParser.a lib/libLLVMLineEditor.a lib/libLLVMProfileData.a lib/libLLVMCoverage.a lib/libLLVMPasses.a lib/libLLVMTargetParser.a lib/libLLVMTextAPI.a lib/libLLVMDlltoolDriver.a lib/libLLVMLibDriver.a lib/libLLVMXRay.a lib/libLLVMWindowsDriver.a lib/libLLVMWindowsManifest.a --no-whole-archive lib/libLLVMExtensions.a lib/libPolly.a lib/libPollyISL.a /usr/lib/libffi.so lib/libLLVMExecutionEngine.a lib/libLLVMJITLink.a lib/libLLVMOrcTargetProcess.a lib/libLLVMOrcShared.a lib/libLLVMRuntimeDyld.a lib/libLLVMMIRParser.a lib/libLLVMPasses.a lib/libLLVMIRPrinter.a lib/libLLVMCoroutines.a lib/libLLVMGlobalISel.a lib/libLLVMCFGuard.a lib/libLLVMMCA.a lib/libLLVMSelectionDAG.a lib/libLLVMAsmPrinter.a lib/libLLVMCodeGen.a lib/libLLVMCodeGenTypes.a lib/libLLVMObjCARCOpts.a lib/libLLVMipo.a lib/libLLVMBitWriter.a lib/libLLVMFrontendOpenMP.a lib/libLLVMInstrumentation.a lib/libLLVMScalarOpts.a lib/libLLVMAggressiveInstCombine.a lib/libLLVMInstCombine.a lib/libLLVMVectorize.a lib/libLLVMLinker.a lib/libLLVMTransformUtils.a lib/libLLVMTarget.a lib/libLLVMAnalysis.a lib/libLLVMMCDisassembler.a /usr/lib/libedit.so lib/libLLVMProfileData.a lib/libLLVMSymbolize.a lib/libLLVMDebugInfoDWARF.a lib/libLLVMDebugInfoPDB.a lib/libLLVMDebugInfoMSF.a lib/libLLVMDebugInfoBTF.a lib/libLLVMOption.a lib/libLLVMObject.a lib/libLLVMIRReader.a lib/libLLVMAsmParser.a lib/libLLVMBitReader.a lib/libLLVMCore.a lib/libLLVMRemarks.a lib/libLLVMBitstreamReader.a lib/libLLVMMCParser.a lib/libLLVMMC.a lib/libLLVMDebugInfoCodeView.a lib/libLLVMTextAPI.a lib/libLLVMBinaryFormat.a lib/libLLVMTargetParser.a lib/libLLVMSupport.a lib/libLLVMDemangle.a -lrt -ldl -lm /usr/lib/libz.so /usr/lib/libzstd.so /usr/lib/libtinfo.so /usr/lib/libxml2.so -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/crtendS.o /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/crtn.o
#0 0x00007fedf5817d08 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/bin/../lib/libLLVM-18git.so+0x3017d08)
#1 0x00007fedf58182c1 (/usr/bin/../lib/libLLVM-18git.so+0x30182c1)
#2 0x00007fedf2023010 (/usr/bin/../lib/libc.so.6+0x223010)
#3 0x00007fedf209160d pthread_kill (/usr/bin/../lib/libc.so.6+0x29160d)
#4 0x00007fedf2022f52 gsignal (/usr/bin/../lib/libc.so.6+0x222f52)
#5 0x00007fedf20004a0 abort (/usr/bin/../lib/libc.so.6+0x2004a0)
#6 0x00007fedf4ba919c llvm::report_fatal_error(llvm::Twine const&, bool) (/usr/bin/../lib/libLLVM-18git.so+0x23a919c)
#7 0x00007fedf4bfc2a5 (/usr/bin/../lib/libLLVM-18git.so+0x23fc2a5)
#8 0x00007fedf54e6c45 (/usr/bin/../lib/libLLVM-18git.so+0x2ce6c45)
#9 0x00007fedf54e6b8d (/usr/bin/../lib/libLLVM-18git.so+0x2ce6b8d)
#10 0x00007fedf518737f llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/usr/bin/../lib/libLLVM-18git.so+0x298737f)
#11 0x00007fedf6ef7823 llvm::lto::opt(llvm::lto::Config const&, llvm::TargetMachine*, unsigned int, llvm::Module&, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*, std::vector<unsigned char, std::allocator<unsigned char>> const&) (/usr/bin/../lib/libLLVM-18git.so+0x46f7823)
#12 0x00007fedf6ef9b78 llvm::lto::backend(llvm::lto::Config const&, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex&) (/usr/bin/../lib/libLLVM-18git.so+0x46f9b78)
#13 0x00007fedf547fba5 llvm::lto::LTO::runRegularLTO(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>) (/usr/bin/../lib/libLLVM-18git.so+0x2c7fba5)
#14 0x00007fedf547e197 llvm::lto::LTO::run(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, std::function<llvm::Expected<std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>> (unsigned int, llvm::StringRef, llvm::Twine const&)>) (/usr/bin/../lib/libLLVM-18git.so+0x2c7e197)
#15 0x0000557c1dcd2fbd lld::elf::BitcodeCompiler::compile() (/usr/bin/ld.lld+0x4d2fbd)
#16 0x0000557c1dc34e07 lld::elf::LinkerDriver::link(llvm::opt::InputArgList&) (/usr/bin/ld.lld+0x434e07)
#17 0x0000557c1dc22e65 lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) (/usr/bin/ld.lld+0x422e65)
#18 0x0000557c1dc2127d lld::elf::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) (/usr/bin/ld.lld+0x42127d)
#19 0x0000557c1db3f0a7 lld::unsafeLldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>, bool) (/usr/bin/ld.lld+0x33f0a7)
#20 0x0000557c1db1cbb8 lld_main(int, char**, llvm::ToolContext const&) (/usr/bin/ld.lld+0x31cbb8)
#21 0x0000557c1db1c90c main (/usr/bin/ld.lld+0x31c90c)
#22 0x00007fedf2001f47 (/usr/bin/../lib/libc.so.6+0x201f47)
#23 0x00007fedf2002004 __libc_start_main (/usr/bin/../lib/libc.so.6+0x202004)
#24 0x0000557c1db1ec91 _start (/usr/bin/ld.lld+0x31ec91)
clang++: error: unable to execute command: Aborted
It seems that the (many months old) PGO-Profile (uploaded here: https://github.com/llvm/llvm-project/issues/63830#issuecomment-1666952173) triggers this in the 64-bit llvm-git build. I cannot reproduce the issue without it nor in the 32-bit build.
Compiling llvm-git with clang version 17.0.0 (1aecb0e000e4efaa347e836e7ac06e070559dc2c), there is a build error while linking
lib/libomp.so
when using FullLTO. This does not reproduce when using ThinLTO.This seems to be a recent regression the last known good revision for me was llvm-git-17.0.0_r467022.758c4640c95c.
Maybe @jhuber6 or @MaskRay find some time to have a look at this?