-
Notifications
You must be signed in to change notification settings - Fork 141
Closed
Description
Working on a testcase. (OpenLB commit 28604adad3006f17656210ae889dd2c5c68e6e96)
val: i64 %1 old: %63 = load i64, i64* %51, align 8
ld.lld: /home/drehwald/prog/Enzyme/enzyme/Enzyme/GradientUtils.h:2195: SmallVector<llvm::SelectInst *, 4> DiffeGradientUtils::addToDiffe(llvm::Value *, llvm::Value *, IRBuilder<> &, llvm::Type *, ArrayRef<llvm::Value *>, llvm::Value *): Assertion `addingType' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /home/drehwald/prog/llvm-14/build/bin/ld.lld -z relro --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o tFS_t /lib/x86_64-linux-gnu/crt1.o /lib/x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/11/crtbegin.o -L../../../external/lib -L/usr/lib/gcc/x86_64-linux-gnu/11 -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib64 -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib64 -L/lib -L/usr/lib -plugin-opt=mcpu=cascadelake -plugin-opt=O3 testFlowSolver.o -lz -ltinyxml -lz -ltinyxml --lto-legacy-pass-manager -mllvm=--print-before=enzyme -mllvm=-load=/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so -mllvm=-enzyme-strict-aliasing=0 -mllvm=-enzyme-loose-types -mllvm=-enzyme-type-warning=0 -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/11/crtend.o /lib/x86_64-linux-gnu/crtn.o
1. Running pass 'Enzyme Pass' on module 'ld-temp.o'.
#0 0x00000000015c4fe3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/drehwald/prog/llvm-14/build/bin/ld.lld+0x15c4fe3)
#1 0x00000000015c2dbe llvm::sys::RunSignalHandlers() (/home/drehwald/prog/llvm-14/build/bin/ld.lld+0x15c2dbe)
#2 0x00000000015c55fa SignalHandler(int) Signals.cpp:0:0
#3 0x00007f9630915520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x00007f9630969a7c __pthread_kill_implementation ./nptl/./nptl/pthread_kill.c:44:76
#5 0x00007f9630969a7c __pthread_kill_internal ./nptl/./nptl/pthread_kill.c:78:10
#6 0x00007f9630969a7c pthread_kill ./nptl/./nptl/pthread_kill.c:89:10
#7 0x00007f9630915476 gsignal ./signal/../sysdeps/posix/raise.c:27:6
#8 0x00007f96308fb7f3 abort ./stdlib/./stdlib/abort.c:81:7
#9 0x00007f96308fb71b _nl_load_domain ./intl/./intl/loadmsgcat.c:1177:9
#10 0x00007f963090ce96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#11 0x00007f962e7f52e9 DiffeGradientUtils::addToDiffe(llvm::Value*, llvm::Value*, llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>&, llvm::Type*, llvm::ArrayRef<llvm::Value*>, llvm::Value*) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x1652e9)
#12 0x00007f962e91e60d AdjointGenerator<AugmentedReturn const*>::visitCallInst(llvm::CallInst&) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x28e60d)
#13 0x00007f962e8533f3 EnzymeLogic::CreatePrimalAndGradient(ReverseCacheKey const&&, TypeAnalysis&, AugmentedReturn const*, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x1c33f3)
#14 0x00007f962e9ac3a7 GradientUtils::GetOrCreateShadowFunction(EnzymeLogic&, llvm::TargetLibraryInfo&, TypeAnalysis&, llvm::Function*, DerivativeMode, unsigned int, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x31c3a7)
#15 0x00007f962e994d19 GradientUtils::invertPointerM(llvm::Value*, llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>&, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x304d19)
#16 0x00007f962e99504b GradientUtils::invertPointerM(llvm::Value*, llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>&, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x30504b)
#17 0x00007f962e993aa2 GradientUtils::invertPointerM(llvm::Value*, llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>&, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x303aa2)
#18 0x00007f962e993eae GradientUtils::invertPointerM(llvm::Value*, llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>&, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x303eae)
#19 0x00007f962e995207 GradientUtils::invertPointerM(llvm::Value*, llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>&, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x305207)
#20 0x00007f962e99504b GradientUtils::invertPointerM(llvm::Value*, llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>&, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x30504b)
#21 0x00007f962e99504b GradientUtils::invertPointerM(llvm::Value*, llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>&, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x30504b)
#22 0x00007f962e89e420 AdjointGenerator<AugmentedReturn*>::visitCommonStore(llvm::Instruction&, llvm::Value*, llvm::Value*, llvm::MaybeAlign, bool, llvm::AtomicOrdering, unsigned char, llvm::Value*) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x20e420)
#23 0x00007f962e89d5ca AdjointGenerator<AugmentedReturn*>::visitStoreInst(llvm::StoreInst&) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x20d5ca)
#24 0x00007f962e841642 EnzymeLogic::CreateAugmentedPrimal(llvm::Function*, DIFFE_TYPE, llvm::ArrayRef<DIFFE_TYPE>, TypeAnalysis&, bool, bool, FnTypeInfo const&, std::map<llvm::Argument*, bool, std::less<llvm::Argument*>, std::allocator<std::pair<llvm::Argument* const, bool> > >, bool, unsigned int, bool, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x1b1642)
#25 0x00007f962e8b222f AdjointGenerator<AugmentedReturn*>::visitCallInst(llvm::CallInst&) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x22222f)
#26 0x00007f962e841642 EnzymeLogic::CreateAugmentedPrimal(llvm::Function*, DIFFE_TYPE, llvm::ArrayRef<DIFFE_TYPE>, TypeAnalysis&, bool, bool, FnTypeInfo const&, std::map<llvm::Argument*, bool, std::less<llvm::Argument*>, std::allocator<std::pair<llvm::Argument* const, bool> > >, bool, unsigned int, bool, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x1b1642)
#27 0x00007f962e8b222f AdjointGenerator<AugmentedReturn*>::visitCallInst(llvm::CallInst&) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x22222f)
#28 0x00007f962e841642 EnzymeLogic::CreateAugmentedPrimal(llvm::Function*, DIFFE_TYPE, llvm::ArrayRef<DIFFE_TYPE>, TypeAnalysis&, bool, bool, FnTypeInfo const&, std::map<llvm::Argument*, bool, std::less<llvm::Argument*>, std::allocator<std::pair<llvm::Argument* const, bool> > >, bool, unsigned int, bool, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x1b1642)
#29 0x00007f962e8b222f AdjointGenerator<AugmentedReturn*>::visitCallInst(llvm::CallInst&) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x22222f)
#30 0x00007f962e841642 EnzymeLogic::CreateAugmentedPrimal(llvm::Function*, DIFFE_TYPE, llvm::ArrayRef<DIFFE_TYPE>, TypeAnalysis&, bool, bool, FnTypeInfo const&, std::map<llvm::Argument*, bool, std::less<llvm::Argument*>, std::allocator<std::pair<llvm::Argument* const, bool> > >, bool, unsigned int, bool, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x1b1642)
#31 0x00007f962e8b222f AdjointGenerator<AugmentedReturn*>::visitCallInst(llvm::CallInst&) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x22222f)
#32 0x00007f962e841642 EnzymeLogic::CreateAugmentedPrimal(llvm::Function*, DIFFE_TYPE, llvm::ArrayRef<DIFFE_TYPE>, TypeAnalysis&, bool, bool, FnTypeInfo const&, std::map<llvm::Argument*, bool, std::less<llvm::Argument*>, std::allocator<std::pair<llvm::Argument* const, bool> > >, bool, unsigned int, bool, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x1b1642)
#33 0x00007f962e9ac1b4 GradientUtils::GetOrCreateShadowFunction(EnzymeLogic&, llvm::TargetLibraryInfo&, TypeAnalysis&, llvm::Function*, DerivativeMode, unsigned int, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x31c1b4)
#34 0x00007f962e994d19 GradientUtils::invertPointerM(llvm::Value*, llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>&, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x304d19)
#35 0x00007f962e99504b GradientUtils::invertPointerM(llvm::Value*, llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>&, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x30504b)
#36 0x00007f962e993aa2 GradientUtils::invertPointerM(llvm::Value*, llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>&, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x303aa2)
#37 0x00007f962e993eae GradientUtils::invertPointerM(llvm::Value*, llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>&, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x303eae)
#38 0x00007f962e995207 GradientUtils::invertPointerM(llvm::Value*, llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>&, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x305207)
#39 0x00007f962e99504b GradientUtils::invertPointerM(llvm::Value*, llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>&, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x30504b)
#40 0x00007f962e99504b GradientUtils::invertPointerM(llvm::Value*, llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>&, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x30504b)
#41 0x00007f962e89e420 AdjointGenerator<AugmentedReturn*>::visitCommonStore(llvm::Instruction&, llvm::Value*, llvm::Value*, llvm::MaybeAlign, bool, llvm::AtomicOrdering, unsigned char, llvm::Value*) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x20e420)
#42 0x00007f962e89d5ca AdjointGenerator<AugmentedReturn*>::visitStoreInst(llvm::StoreInst&) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x20d5ca)
#43 0x00007f962e841642 EnzymeLogic::CreateAugmentedPrimal(llvm::Function*, DIFFE_TYPE, llvm::ArrayRef<DIFFE_TYPE>, TypeAnalysis&, bool, bool, FnTypeInfo const&, std::map<llvm::Argument*, bool, std::less<llvm::Argument*>, std::allocator<std::pair<llvm::Argument* const, bool> > >, bool, unsigned int, bool, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x1b1642)
#44 0x00007f962e8b222f AdjointGenerator<AugmentedReturn*>::visitCallInst(llvm::CallInst&) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x22222f)
#45 0x00007f962e841642 EnzymeLogic::CreateAugmentedPrimal(llvm::Function*, DIFFE_TYPE, llvm::ArrayRef<DIFFE_TYPE>, TypeAnalysis&, bool, bool, FnTypeInfo const&, std::map<llvm::Argument*, bool, std::less<llvm::Argument*>, std::allocator<std::pair<llvm::Argument* const, bool> > >, bool, unsigned int, bool, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x1b1642)
#46 0x00007f962e8b222f AdjointGenerator<AugmentedReturn*>::visitCallInst(llvm::CallInst&) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x22222f)
#47 0x00007f962e841642 EnzymeLogic::CreateAugmentedPrimal(llvm::Function*, DIFFE_TYPE, llvm::ArrayRef<DIFFE_TYPE>, TypeAnalysis&, bool, bool, FnTypeInfo const&, std::map<llvm::Argument*, bool, std::less<llvm::Argument*>, std::allocator<std::pair<llvm::Argument* const, bool> > >, bool, unsigned int, bool, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x1b1642)
#48 0x00007f962e8b222f AdjointGenerator<AugmentedReturn*>::visitCallInst(llvm::CallInst&) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x22222f)
#49 0x00007f962e841642 EnzymeLogic::CreateAugmentedPrimal(llvm::Function*, DIFFE_TYPE, llvm::ArrayRef<DIFFE_TYPE>, TypeAnalysis&, bool, bool, FnTypeInfo const&, std::map<llvm::Argument*, bool, std::less<llvm::Argument*>, std::allocator<std::pair<llvm::Argument* const, bool> > >, bool, unsigned int, bool, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x1b1642)
#50 0x00007f962e8b222f AdjointGenerator<AugmentedReturn*>::visitCallInst(llvm::CallInst&) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x22222f)
#51 0x00007f962e841642 EnzymeLogic::CreateAugmentedPrimal(llvm::Function*, DIFFE_TYPE, llvm::ArrayRef<DIFFE_TYPE>, TypeAnalysis&, bool, bool, FnTypeInfo const&, std::map<llvm::Argument*, bool, std::less<llvm::Argument*>, std::allocator<std::pair<llvm::Argument* const, bool> > >, bool, unsigned int, bool, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x1b1642)
#52 0x00007f962e919c6f AdjointGenerator<AugmentedReturn const*>::visitCallInst(llvm::CallInst&) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x289c6f)
#53 0x00007f962e8533f3 EnzymeLogic::CreatePrimalAndGradient(ReverseCacheKey const&&, TypeAnalysis&, AugmentedReturn const*, bool) (/home/drehwald/prog/Enzyme/enzyme/buildRel/Enzyme/LLDEnzyme-14.so+0x1c33f3)
#54 0x00007f962e828a89 (anonymous namespace)::Enzyme::HandleAutoDiff(llvm::CallInst*, llvm::TargetLibraryInfo&, DerivativeMode, bool) Enzyme.cpp:0:0
#55 0x00007f962e823445 (anonymous namespace)::Enzyme::lowerEnzymeCalls(llvm::Function&, bool&, std::set<llvm::Function*, std::less<llvm::Function*>, std::allocator<llvm::Function*> >&) Enzyme.cpp:0:0
#56 0x00007f962e81f0b7 (anonymous namespace)::Enzyme::runOnModule(llvm::Module&) Enzyme.cpp:0:0
#57 0x00000000036aef6c llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/drehwald/prog/llvm-14/build/bin/ld.lld+0x36aef6c)
#58 0x00000000020bfb0f 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/drehwald/prog/llvm-14/build/bin/ld.lld+0x20bfb0f)
#59 0x00000000020c1ed1 llvm::lto::backend(llvm::lto::Config const&, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream> > > (unsigned int)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex&) (/home/drehwald/prog/llvm-14/build/bin/ld.lld+0x20c1ed1)
#60 0x00000000020b5587 llvm::lto::LTO::runRegularLTO(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream> > > (unsigned int)>) (/home/drehwald/prog/llvm-14/build/bin/ld.lld+0x20b5587)
#61 0x00000000020b4bec llvm::lto::LTO::run(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream> > > (unsigned int)>, std::function<llvm::Expected<std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream> > > (unsigned int)> > (unsigned int, llvm::StringRef)>) (/home/drehwald/prog/llvm-14/build/bin/ld.lld+0x20b4bec)
#62 0x000000000173e75c lld::elf::BitcodeCompiler::compile() (/home/drehwald/prog/llvm-14/build/bin/ld.lld+0x173e75c)
#63 0x000000000169a736 void lld::elf::LinkerDriver::compileBitcodeFiles<llvm::object::ELFType<(llvm::support::endianness)1, true> >(bool) (/home/drehwald/prog/llvm-14/build/bin/ld.lld+0x169a736)
#64 0x000000000169737f lld::elf::LinkerDriver::link(llvm::opt::InputArgList&) (/home/drehwald/prog/llvm-14/build/bin/ld.lld+0x169737f)
#65 0x000000000168bcdf lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) (/home/drehwald/prog/llvm-14/build/bin/ld.lld+0x168bcdf)
#66 0x000000000168a0bf lld::elf::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) (/home/drehwald/prog/llvm-14/build/bin/ld.lld+0x168a0bf)
#67 0x0000000001519a62 lldMain(int, char const**, llvm::raw_ostream&, llvm::raw_ostream&, bool) lld.cpp:0:0
#68 0x0000000001519257 main (/home/drehwald/prog/llvm-14/build/bin/ld.lld+0x1519257)
#69 0x00007f96308fcd90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#70 0x00007f96308fce40 call_init ./csu/../csu/libc-start.c:128:20
#71 0x00007f96308fce40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#72 0x0000000001518d95 _start (/home/drehwald/prog/llvm-14/build/bin/ld.lld+0x1518d95)
clang-14: error: unable to execute command: Aborted (core dumped)
clang-14: error: linker command failed due to signal (use -v to see invocation)
make: *** [Makefile:66: test] Error 254
Metadata
Metadata
Assignees
Labels
No labels