EnzymeAD / EnzymeAD/Enzyme

Unknown type for libm (__mulsc3)

Open
#856 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
LLVM
Stars
1.7k
Forks
188
Avg merge
2d 4h
Merged PRs (30d)
22

Description

```
[100%] Linking C shared library libgraphblas.so
<2 x float> - %80 = tail call <2 x float> @__mulsc3(float noundef %60, float noundef %59, float noundef %67, float noundef %69) #69
Unknown type for libm
UNREACHABLE executed at /home/wimmerer/Enzyme/enzyme/Enzyme/TypeAnalysis/TypeAnalysis.cpp:4291!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /home/wimmerer/spack/var/spack/environments/llvm/.spack-env/view/bin/ld.lld @/tmp/response-65d05d.txt
1. Running pass 'Enzyme Pass' on module 'ld-temp.o'.
#0 0x000055bc7f5648df PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
#1 0x000055bc7f56180d SignalHandler(int) Signals.cpp:0:0
#2 0x00007f82904f3980 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
#3 0x00007f828ee34e87 raise /build/glibc-CVJwZb/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#4 0x00007f828ee367f1 abort /build/glibc-CVJwZb/glibc-2.27/stdlib/abort.c:81:0
#5 0x000055bc7f4f054a (/home/wimmerer/spack/var/spack/environments/llvm/.spack-env/view/bin/ld.lld+0x79254a)
#6 0x00007f828e79f084 TypeAnalyzer::visitCallInst(llvm::CallInst&) (/home/wimmerer/Enzyme/enzyme/build/Enzyme/LLDEnzyme-14.so+0x30c084)
#7 0x00007f828e7a4c4c TypeAnalyzer::run() (/home/wimmerer/Enzyme/enzyme/build/Enzyme/LLDEnzyme-14.so+0x311c4c)
#8 0x00007f828e7bce26 TypeAnalysis::analyzeFunction(FnTypeInfo const&) (/home/wimmerer/Enzyme/enzyme/build/Enzyme/LLDEnzyme-14.so+0x329e26)
#9 0x00007f828e7bdd40 TypeAnalyzer::visitIPOCall(llvm::CallInst&, llvm::Function&) (/home/wimmerer/Enzyme/enzyme/build/Enzyme/LLDEnzyme-14.so+0x32ad40)
#10 0x00007f828e79eb2e TypeAnalyzer::visitCallInst(llvm::CallInst&) (/home/wimmerer/Enzyme/enzyme/build/Enzyme/LLDEnzyme-14.so+0x30bb2e)
#11 0x00007f828e7a49a9 TypeAnalyzer::run() (/home/wimmerer/Enzyme/enzyme/build/Enzyme/LLDEnzyme-14.so+0x3119a9)
#12 0x00007f828e7bce26 TypeAnalysis::analyzeFunction(FnTypeInfo const&) (/home/wimmerer/Enzyme/enzyme/build/Enzyme/LLDEnzyme-14.so+0x329e26)
#13 0x00007f828e7bdd40 TypeAnalyzer::visitIPOCall(llvm::CallInst&, llvm::Function&) (/home/wimmerer/Enzyme/enzyme/build/Enzyme/LLDEnzyme-14.so+0x32ad40)
#14 0x00007f828e79eb2e TypeAnalyzer::visitCallInst(llvm::CallInst&) (/home/wimmerer/Enzyme/enzyme/build/Enzyme/LLDEnzyme-14.so+0x30bb2e)
#15 0x00007f828e7a49a9 TypeAnalyzer::run() (/home/wimmerer/Enzyme/enzyme/build/Enzyme/LLDEnzyme-14.so+0x3119a9)
#16 0x00007f828e7bce26 TypeAnalysis::analyzeFunction(FnTypeInfo const&) (/home/wimmerer/Enzyme/enzyme/build/Enzyme/LLDEnzyme-14.so+0x329e26)
#17 0x00007f828e7bdd40 TypeAnalyzer::visitIPOCall(llvm::CallInst&, llvm::Function&) (/home/wimmerer/Enzyme/enzyme/build/Enzyme/LLDEnzyme-14.so+0x32ad40)
#18 0x00007f828e79eb2e TypeAnalyzer::visitCallInst(llvm::CallInst&) (/home/wimmerer/Enzyme/enzyme/build/Enzyme/LLDEnzyme-14.so+0x30bb2e)
#19 0x00007f828e7a49a9 TypeAnalyzer::run() (/home/wimmerer/Enzyme/enzyme/build/Enzyme/LLDEnzyme-14.so+0x3119a9)
#20 0x00007f828e7bce26 TypeAnalysis::analyzeFunction(FnTypeInfo const&) (/home/wimmerer/Enzyme/enzyme/build/Enzyme/LLDEnzyme-14.so+0x329e26)
#21 0x00007f828e7bdd40 TypeAnalyzer::visitIPOCall(llvm::CallInst&, llvm::Function&) (/home/wimmerer/Enzyme/enzyme/build/Enzyme/LLDEnzyme-14.so+0x32ad40)
#22 0x00007f828e79eb2e TypeAnalyzer::visitCallInst(llvm::CallInst&) (/home/wimmerer/Enzyme/enzyme/build/Enzyme/LLDEnzyme-14.so+0x30bb2e)
#23 0x00007f828e7a49a9 TypeAnalyzer::run() (/home/wimmerer/Enzyme/enzyme/build/Enzyme/LLDEnzyme-14.so+0x3119a9)
#24 0x00007f828e7bce26 TypeAnalysis::analyzeFunction(FnTypeInfo const&) (/home/wimmerer/Enzyme/enzyme/build/Enzyme/LLDEnzyme-14.so+0x329e26)
#25 0x00007f828e5b1916 (anonymous namespace)::Enzyme::HandleAutoDiff(llvm::CallInst*, llvm::TargetLibraryInfo&, DerivativeMode, bool) Enzyme.cpp:0:0
#26 0x00007f828e5ac6c5 (anonymous namespace)::Enzyme::lowerEnzymeCalls(llvm::Function&, bool&, std::set, std::allocator >&) Enzyme.cpp:0:0
#27 0x00007f828e5a72a6 (anonymous namespace)::Enzyme::runOnModule(llvm::Module&) Enzyme.cpp:0:0
#28 0x000055bc81ba919e llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/wimmerer/spack/var/spack/environments/llvm/.spack-env/view/bin/ld.lld+0x2e4b19e)
#29 0x000055bc801994cb llvm::lto::opt(llvm::lto::Config const&, llvm::TargetMachine*, unsigned int, llvm::Module&, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*, std::vector > const&) (/home/wimmerer/spack/var/spack/environments/llvm/.spack-env/view/bin/ld.lld+0x143b4cb)
#30 0x000055bc8019a3ed llvm::lto::backend(llvm::lto::Config const&, std::function > > (unsigned int)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex&) (/home/wimmerer/spack/var/spack/environments/llvm/.spack-env/view/bin/ld.lld+0x143c3ed)
#31 0x000055bc8018f180 llvm::lto::LTO::runRegularLTO(std::function > > (unsigned int)>) (/home/wimmerer/spack/var/spack/environments/llvm/.spack-env/view/bin/ld.lld+0x1431180)
#32 0x000055bc8018f92b llvm::lto::LTO::run(std::function > > (unsigned int)>, std::function > > (unsigned int)> > (unsigned int, llvm::StringRef)>) (/home/wimmerer/spack/var/spack/environments/llvm/.spack-env/view/bin/ld.lld+0x143192b)
#33 0x000055bc7f714921 lld::elf::BitcodeCompiler::compile() (/home/wimmerer/spack/var/spack/environments/llvm/.spack-env/view/bin/ld.lld+0x9b6921)
#34 0x000055bc7f68ad62 void lld::elf::LinkerDriver::compileBitcodeFiles >(bool) (/home/wimmerer/spack/var/spack/environments/llvm/.spack-env/view/bin/ld.lld+0x92cd62)
#35 0x000055bc7f6906ba lld::elf::LinkerDriver::link(llvm::opt::InputArgList&) (/home/wimmerer/spack/var/spack/environments/llvm/.spack-env/view/bin/ld.lld+0x9326ba)
#36 0x000055bc7f69431a lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef) (/home/wimmerer/spack/var/spack/environments/llvm/.spack-env/view/bin/ld.lld+0x93631a)
#37 0x000055bc7f69573c lld::elf::link(llvm::ArrayRef, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) (/home/wimmerer/spack/var/spack/environments/llvm/.spack-env/view/bin/ld.lld+0x93773c)
#38 0x000055bc7f4d13cc lldMain(int, char const**, llvm::raw_ostream&, llvm::raw_ostream&, bool) lld.cpp:0:0
#39 0x000055bc7f4442ef main (/home/wimmerer/spack/var/spack/environments/llvm/.spack-env/view/bin/ld.lld+0x6e62ef)
#40 0x00007f828ee17c87 __libc_start_main /build/glibc-CVJwZb/glibc-2.27/csu/../csu/libc-start.c:344:0
#41 0x000055bc7f4cfe8a _start (/home/wimmerer/spack/var/spack/environments/llvm/.spack-env/view/bin/ld.lld+0x771e8a)
```
Valentin indicated that this is LLVM vectorizing before we need it to.

Is this a matter of needing to run one optimization pipeline during compile time and another after Enzyme during link time?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.