EnzymeAD / EnzymeAD/Enzyme

compiled with clang20 failed while clang18 passed for using a vector with runtime size

Open
#2,137 0 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

Here is the code,

double dprod(const std::vector& v) {
double r = 1;
for (int i = 0; i < v.size(); i++) {
r *= v[i];
}
return r;
}

double g2(double x, int n) {
std::vector v;
for (int i = 0; i < n; ++i) {
v.push_back(std::pow(x, i));
}
return dprod(v);
}

int main() {
double x = 3;
int n = 5;
double dg2_dx = __enzyme_autodiff((void*)g2, enzyme_out, x, enzyme_const, n);
printf("g2(%g, %d)=%g, dg2_dx=%g\n", x, n, g2(x,n), dg2_dx);
}

It works fine when built with clang18 with "-O3 -std=c++20", but it failed with clang20 with the same build/compilation options, here is the error message,

unknown tbaa call instruction user inst: %call.i = tail call noundef double @pow(double noundef %x, double noundef %conv.i) #12, !dbg !2031, !tbaa !2032 vdptr: {[]:Pointer, [-1]:Integer}
unknown tbaa call instruction user inst: %call.i = tail call noundef double @pow(double noundef %x, double noundef %conv.i) #13, !dbg !2030, !tbaa !2031 vdptr: {[]:Pointer, [-1]:Integer}
clang++: /root/llvm-project/llvm/lib/IR/Instruction.cpp:153: void llvm::Instruction::insertBefore(llvm::BasicBlock&, llvm::iplist_impl, llvm::ilist_parent >, llvm::SymbolTableListTraits, llvm::ilist_parent > >::iterator): Assertion `!isa(this) && "Inserting PHI after debug-records!"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/clang++ -gdwarf-4 -g -o /tmp/compiler-explorer-compiler2024928-67-1ef00sm.0vvil/output.s -mllvm --x86-asm-syntax=intel -fno-verbose-asm -S -fpass-plugin=/opt/compiler-explorer/main/ClangEnzyme-20.so -Xclang -load -Xclang /opt/compiler-explorer/main/ClangEnzyme-20.so -fcolor-diagnostics -fno-crash-diagnostics -O3 -std=c++20
1. parser at end of file
2. Optimizer
3. Running pass "EnzymeNewPM" on module ""
#0 0x0000000003b86708 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3b86708)
#1 0x0000000003b843cc llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3b843cc)
#2 0x0000000003ad2b58 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
#3 0x00007fdfc09b8520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x00007fdfc0a0c9fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#5 0x00007fdfc09b8476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#6 0x00007fdfc099e7f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#7 0x00007fdfc099e71b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
#8 0x00007fdfc09afe96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#9 0x000000000349f6f7 (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x349f6f7)
#10 0x000000000349f727 llvm::Instruction::insertInto(llvm::BasicBlock*, llvm::ilist_iterator_w_bits, false, false>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x349f727)
#11 0x000000000348e914 llvm::IRBuilderDefaultInserter::InsertHelper(llvm::Instruction*, llvm::Twine const&, llvm::ilist_iterator_w_bits, false, false>) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x348e914)
#12 0x00007fdfbfe87da3 llvm::PHINode* llvm::IRBuilderBase::Insert(llvm::PHINode*, llvm::Twine const&) const /opt/compiler-explorer/clang-assertions-trunk-20240927/include/llvm/IR/IRBuilder.h:144:22
#13 0x00007fdfbfe85bb0 llvm::IRBuilderBase::CreatePHI(llvm::Type*, unsigned int, llvm::Twine const&) /opt/compiler-explorer/clang-assertions-trunk-20240927/include/llvm/IR/IRBuilder.h:2430:3
#14 0x00007fdfc0421e2d GradientUtils::fixLCSSA(llvm::Instruction*, llvm::BasicBlock*, bool) /app/Enzyme/enzyme/Enzyme/GradientUtils.cpp:2484:76
#15 0x00007fdfc0421fb8 GradientUtils::fixLCSSA(llvm::Instruction*, llvm::BasicBlock*, bool) /app/Enzyme/enzyme/Enzyme/GradientUtils.cpp:2493:21
#16 0x00007fdfc0421fb8 GradientUtils::fixLCSSA(llvm::Instruction*, llvm::BasicBlock*, bool) /app/Enzyme/enzyme/Enzyme/GradientUtils.cpp:2493:21
#17 0x00007fdfc0421fb8 GradientUtils::fixLCSSA(llvm::Instruction*, llvm::BasicBlock*, bool) /app/Enzyme/enzyme/Enzyme/GradientUtils.cpp:2493:21
#18 0x00007fdfc0421fb8 GradientUtils::fixLCSSA(llvm::Instruction*, llvm::BasicBlock*, bool) /app/Enzyme/enzyme/Enzyme/GradientUtils.cpp:2493:21
#19 0x00007fdfc0443a99 GradientUtils::lookupM(llvm::Value*, llvm::IRBuilder&, llvm::ValueMap>> const&, bool, llvm::BasicBlock*) /app/Enzyme/enzyme/Enzyme/GradientUtils.cpp:6605:7
#20 0x00007fdfc041f4e3 GradientUtils::unwrapM(llvm::Value*, llvm::IRBuilder&, llvm::ValueMap>> const&, UnwrapMode, llvm::BasicBlock*, bool) /app/Enzyme/enzyme/Enzyme/GradientUtils.cpp:2262:28
#21 0x00007fdfc044409e GradientUtils::lookupM(llvm::Value*, llvm::IRBuilder&, llvm::ValueMap>> const&, bool, llvm::BasicBlock*) /app/Enzyme/enzyme/Enzyme/GradientUtils.cpp:6638:24
#22 0x00007fdfc0411f34 GradientUtils::unwrapM(llvm::Value*, llvm::IRBuilder&, llvm::ValueMap>> const&, UnwrapMode, llvm::BasicBlock*, bool) /app/Enzyme/enzyme/Enzyme/GradientUtils.cpp:1209:16
#23 0x00007fdfc044409e GradientUtils::lookupM(llvm::Value*, llvm::IRBuilder&, llvm::ValueMap>> const&, bool, llvm::BasicBlock*) /app/Enzyme/enzyme/Enzyme/GradientUtils.cpp:6638:24
#24 0x00007fdfc0413266 GradientUtils::unwrapM(llvm::Value*, llvm::IRBuilder&, llvm::ValueMap>> const&, UnwrapMode, llvm::BasicBlock*, bool) /app/Enzyme/enzyme/Enzyme/GradientUtils.cpp:1267:19
#25 0x00007fdfc044409e GradientUtils::lookupM(llvm::Value*, llvm::IRBuilder&, llvm::ValueMap>> const&, bool, llvm::BasicBlock*) /app/Enzyme/enzyme/Enzyme/GradientUtils.cpp:6638:24
#26 0x00007fdfc003885c AdjointGenerator::lookup(llvm::Value*, llvm::IRBuilder&) /app/Enzyme/enzyme/Enzyme/AdjointGenerator.h:2138:27
#27 0x00007fdfc02f9d17 AdjointGenerator::visitBinaryOperator(llvm::BinaryOperator&) /tmp/build/main/clang-assertions-trunk/Enzyme/BinopDerivatives.inc:677:37
#28 0x00007fdfc034d035 llvm::InstVisitor::visitFMul(llvm::BinaryOperator&) /opt/compiler-explorer/clang-assertions-trunk-20240927/include/llvm/IR/Instruction.def:152:1
#29 0x00007fdfc033da25 llvm::InstVisitor::visit(llvm::Instruction&) /opt/compiler-explorer/clang-assertions-trunk-20240927/include/llvm/IR/Instruction.def:152:1
#30 0x00007fdfc032a0b5 llvm::InstVisitor::visit(llvm::Instruction*) /opt/compiler-explorer/clang-assertions-trunk-20240927/include/llvm/IR/InstVisitor.h:111:49
#31 0x00007fdfc02d27c9 EnzymeLogic::CreatePrimalAndGradient(RequestContext, ReverseCacheKey const&&, TypeAnalysis&, AugmentedReturn const*, bool) /app/Enzyme/enzyme/Enzyme/EnzymeLogic.cpp:4298:7
#32 0x00007fdfc024e27a (anonymous namespace)::EnzymeBase::HandleAutoDiff(llvm::Instruction*, unsigned int, llvm::Value*, llvm::Type*, llvm::SmallVectorImpl&, std::map, std::allocator>> const&, std::vector> const&, llvm::Function*, DerivativeMode, (anonymous namespace)::EnzymeBase::Options&, bool, llvm::SmallVectorImpl&) /app/Enzyme/enzyme/Enzyme/Enzyme.cpp:1752:46
#33 0x00007fdfc0250084 (anonymous namespace)::EnzymeBase::HandleAutoDiffArguments(llvm::CallInst*, DerivativeMode, bool, llvm::SmallVectorImpl&) /app/Enzyme/enzyme/Enzyme/Enzyme.cpp:2017:26
#34 0x00007fdfc02555a8 (anonymous namespace)::EnzymeBase::lowerEnzymeCalls(llvm::Function&, std::set, std::allocator>&) /app/Enzyme/enzyme/Enzyme/Enzyme.cpp:2775:48
#35 0x00007fdfc0256e9d (anonymous namespace)::EnzymeBase::run(llvm::Module&) /app/Enzyme/enzyme/Enzyme/Enzyme.cpp:3003:15
#36 0x00007fdfc026061c EnzymeNewPM::run(llvm::Module&, llvm::AnalysisManager&) /app/Enzyme/enzyme/Enzyme/Enzyme.cpp:3264:56
#37 0x00007fdfc02a991f llvm::detail::PassModel>::run(llvm::Module&, llvm::AnalysisManager&) /opt/compiler-explorer/clang-assertions-trunk-20240927/include/llvm/IR/PassManagerInternal.h:91:3
#38 0x000000000353eb80 llvm::PassManager>::run(llvm::Module&, llvm::AnalysisManager&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x353eb80)
#39 0x0000000003e30f0b (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr>&, std::unique_ptr>&, clang::BackendConsumer*) BackendUtil.cpp:0:0
#40 0x0000000003e344cd clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr, std::unique_ptr>, clang::BackendConsumer*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3e344cd)
#41 0x00000000044dccde clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44dccde)
#42 0x00000000047d1f18 clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x47d1f18)
#43 0x00000000065fb90c clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x65fb90c)
#44 0x00000000044dd0c8 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44dd0c8)
#45 0x0000000004796d49 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4796d49)
#46 0x00000000047155ce clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x47155ce)
#47 0x000000000487c86e clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x487c86e)
#48 0x0000000000cceeff cc1_main(llvm::ArrayRef, char const*, void*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xcceeff)
#49 0x0000000000cc6c0a ExecuteCC1Tool(llvm::SmallVectorImpl&, llvm::ToolContext const&) driver.cpp:0:0
#50 0x0000000004521349 void llvm::function_ref::callback_fn>, std::__cxx11::basic_string, std::allocator>*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#51 0x0000000003ad3004 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3ad3004)
#52 0x000000000452193f clang::driver::CC1Command::Execute(llvm::ArrayRef>, std::__cxx11::basic_string, std::allocator>*, bool*) const (.part.0) Job.cpp:0:0
#53 0x00000000044e6ccd clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44e6ccd)
#54 0x00000000044e7dbd clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl>&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44e7dbd)
#55 0x00000000044efa75 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44efa75)
#56 0x0000000000ccbdcf clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xccbdcf)
#57 0x0000000000b9b7f4 main (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xb9b7f4)
#58 0x00007fdfc099fd90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#59 0x00007fdfc099fe40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#60 0x0000000000cc66be _start (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xcc66be)
clang++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
ASM generation compiler returned: 134
unknown tbaa call instruction user inst: %call.i = tail call noundef double @pow(double noundef %x, double noundef %conv.i) #12, !dbg !2031, !tbaa !2032 vdptr: {[]:Pointer, [-1]:Integer}
unknown tbaa call instruction user inst: %call.i = tail call noundef double @pow(double noundef %x, double noundef %conv.i) #13, !dbg !2030, !tbaa !2031 vdptr: {[]:Pointer, [-1]:Integer}
clang-20: /root/llvm-project/llvm/lib/IR/Instruction.cpp:153: void llvm::Instruction::insertBefore(llvm::BasicBlock&, llvm::iplist_impl, llvm::ilist_parent >, llvm::SymbolTableListTraits, llvm::ilist_parent > >::iterator): Assertion `!isa(this) && "Inserting PHI after debug-records!"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /opt/compiler-explorer/clang-assertions-trunk-20240927/bin/clang-20 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -dumpdir /tmp/compiler-explorer-compiler2024928-67-hl8wfb.oi0u/output.s- -disable-free -clear-ast-before-backend -main-file-name example.cpp -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=none -fmath-errno -ffp-contract=on -fno-rounding-math -fno-verbose-asm -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debug-info-kind=constructor -dwarf-version=4 -debugger-tuning=gdb -fdebug-compilation-dir=/tmp/compiler-explorer-compiler2024928-67-hl8wfb.oi0u -fcoverage-compilation-dir=/tmp/compiler-explorer-compiler2024928-67-hl8wfb.oi0u -resource-dir /opt/compiler-explorer/clang-assertions-trunk-20240927/lib/clang/20 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/x86_64-linux-gnu/c++/11 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/backward -internal-isystem /opt/compiler-explorer/clang-assertions-trunk-20240927/lib/clang/20/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -std=c++20 -fdeprecated-macro -ferror-limit 19 -fgnuc-version=4.2.1 -fno-implicit-modules -fskip-odr-check-in-gmf -fcxx-exceptions -fexceptions -fcolor-diagnostics -vectorize-loops -vectorize-slp -fpass-plugin=/opt/compiler-explorer/main/ClangEnzyme-20.so -load /opt/compiler-explorer/main/ClangEnzyme-20.so -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/example-cb14b1.o -x c++
1. parser at end of file
2. Optimizer
3. Running pass "EnzymeNewPM" on module ""
#0 0x0000000003b86708 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk-20240927/bin/clang-20+0x3b86708)
#1 0x0000000003b840bc SignalHandler(int) Signals.cpp:0:0
#2 0x00007f9a82cd6520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#3 0x00007f9a82d2a9fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#4 0x00007f9a82cd6476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#5 0x00007f9a82cbc7f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#6 0x00007f9a82cbc71b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
#7 0x00007f9a82ccde96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#8 0x000000000349f6f7 (/opt/compiler-explorer/clang-assertions-trunk-20240927/bin/clang-20+0x349f6f7)
#9 0x000000000349f727 llvm::Instruction::insertInto(llvm::BasicBlock*, llvm::ilist_iterator_w_bits, false, false>) (/opt/compiler-explorer/clang-assertions-trunk-20240927/bin/clang-20+0x349f727)
#10 0x000000000348e914 llvm::IRBuilderDefaultInserter::InsertHelper(llvm::Instruction*, llvm::Twine const&, llvm::ilist_iterator_w_bits, false, false>) const (/opt/compiler-explorer/clang-assertions-trunk-20240927/bin/clang-20+0x348e914)
#11 0x00007f9a821a5da3 llvm::PHINode* llvm::IRBuilderBase::Insert(llvm::PHINode*, llvm::Twine const&) const /opt/compiler-explorer/clang-assertions-trunk-20240927/include/llvm/IR/IRBuilder.h:144:22
#12 0x00007f9a821a3bb0 llvm::IRBuilderBase::CreatePHI(llvm::Type*, unsigned int, llvm::Twine const&) /opt/compiler-explorer/clang-assertions-trunk-20240927/include/llvm/IR/IRBuilder.h:2430:3
#13 0x00007f9a8273fe2d GradientUtils::fixLCSSA(llvm::Instruction*, llvm::BasicBlock*, bool) /app/Enzyme/enzyme/Enzyme/GradientUtils.cpp:2484:76
#14 0x00007f9a8273ffb8 GradientUtils::fixLCSSA(llvm::Instruction*, llvm::BasicBlock*, bool) /app/Enzyme/enzyme/Enzyme/GradientUtils.cpp:2493:21
#15 0x00007f9a8273ffb8 GradientUtils::fixLCSSA(llvm::Instruction*, llvm::BasicBlock*, bool) /app/Enzyme/enzyme/Enzyme/GradientUtils.cpp:2493:21
#16 0x00007f9a8273ffb8 GradientUtils::fixLCSSA(llvm::Instruction*, llvm::BasicBlock*, bool) /app/Enzyme/enzyme/Enzyme/GradientUtils.cpp:2493:21
#17 0x00007f9a8273ffb8 GradientUtils::fixLCSSA(llvm::Instruction*, llvm::BasicBlock*, bool) /app/Enzyme/enzyme/Enzyme/GradientUtils.cpp:2493:21
#18 0x00007f9a82761a99 GradientUtils::lookupM(llvm::Value*, llvm::IRBuilder&, llvm::ValueMap>> const&, bool, llvm::BasicBlock*) /app/Enzyme/enzyme/Enzyme/GradientUtils.cpp:6605:7
#19 0x00007f9a8273d4e3 GradientUtils::unwrapM(llvm::Value*, llvm::IRBuilder&, llvm::ValueMap>> const&, UnwrapMode, llvm::BasicBlock*, bool) /app/Enzyme/enzyme/Enzyme/GradientUtils.cpp:2262:28
#20 0x00007f9a8276209e GradientUtils::lookupM(llvm::Value*, llvm::IRBuilder&, llvm::ValueMap>> const&, bool, llvm::BasicBlock*) /app/Enzyme/enzyme/Enzyme/GradientUtils.cpp:6638:24
#21 0x00007f9a8272ff34 GradientUtils::unwrapM(llvm::Value*, llvm::IRBuilder&, llvm::ValueMap>> const&, UnwrapMode, llvm::BasicBlock*, bool) /app/Enzyme/enzyme/Enzyme/GradientUtils.cpp:1209:16
#22 0x00007f9a8276209e GradientUtils::lookupM(llvm::Value*, llvm::IRBuilder&, llvm::ValueMap>> const&, bool, llvm::BasicBlock*) /app/Enzyme/enzyme/Enzyme/GradientUtils.cpp:6638:24
#23 0x00007f9a82731266 GradientUtils::unwrapM(llvm::Value*, llvm::IRBuilder&, llvm::ValueMap>> const&, UnwrapMode, llvm::BasicBlock*, bool) /app/Enzyme/enzyme/Enzyme/GradientUtils.cpp:1267:19
#24 0x00007f9a8276209e GradientUtils::lookupM(llvm::Value*, llvm::IRBuilder&, llvm::ValueMap>> const&, bool, llvm::BasicBlock*) /app/Enzyme/enzyme/Enzyme/GradientUtils.cpp:6638:24
#25 0x00007f9a8235685c AdjointGenerator::lookup(llvm::Value*, llvm::IRBuilder&) /app/Enzyme/enzyme/Enzyme/AdjointGenerator.h:2138:27
#26 0x00007f9a82617d17 AdjointGenerator::visitBinaryOperator(llvm::BinaryOperator&) /tmp/build/main/clang-assertions-trunk/Enzyme/BinopDerivatives.inc:677:37
#27 0x00007f9a8266b035 llvm::InstVisitor::visitFMul(llvm::BinaryOperator&) /opt/compiler-explorer/clang-assertions-trunk-20240927/include/llvm/IR/Instruction.def:152:1
#28 0x00007f9a8265ba25 llvm::InstVisitor::visit(llvm::Instruction&) /opt/compiler-explorer/clang-assertions-trunk-20240927/include/llvm/IR/Instruction.def:152:1
#29 0x00007f9a826480b5 llvm::InstVisitor::visit(llvm::Instruction*) /opt/compiler-explorer/clang-assertions-trunk-20240927/include/llvm/IR/InstVisitor.h:111:49
#30 0x00007f9a825f07c9 EnzymeLogic::CreatePrimalAndGradient(RequestContext, ReverseCacheKey const&&, TypeAnalysis&, AugmentedReturn const*, bool) /app/Enzyme/enzyme/Enzyme/EnzymeLogic.cpp:4298:7
#31 0x00007f9a8256c27a (anonymous namespace)::EnzymeBase::HandleAutoDiff(llvm::Instruction*, unsigned int, llvm::Value*, llvm::Type*, llvm::SmallVectorImpl&, std::map, std::allocator>> const&, std::vector> const&, llvm::Function*, DerivativeMode, (anonymous namespace)::EnzymeBase::Options&, bool, llvm::SmallVectorImpl&) /app/Enzyme/enzyme/Enzyme/Enzyme.cpp:1752:46
#32 0x00007f9a8256e084 (anonymous namespace)::EnzymeBase::HandleAutoDiffArguments(llvm::CallInst*, DerivativeMode, bool, llvm::SmallVectorImpl&) /app/Enzyme/enzyme/Enzyme/Enzyme.cpp:2017:26
#33 0x00007f9a825735a8 (anonymous namespace)::EnzymeBase::lowerEnzymeCalls(llvm::Function&, std::set, std::allocator>&) /app/Enzyme/enzyme/Enzyme/Enzyme.cpp:2775:48
#34 0x00007f9a82574e9d (anonymous namespace)::EnzymeBase::run(llvm::Module&) /app/Enzyme/enzyme/Enzyme/Enzyme.cpp:3003:15
#35 0x00007f9a8257e61c EnzymeNewPM::run(llvm::Module&, llvm::AnalysisManager&) /app/Enzyme/enzyme/Enzyme/Enzyme.cpp:3264:56
#36 0x00007f9a825c791f llvm::detail::PassModel>::run(llvm::Module&, llvm::AnalysisManager&) /opt/compiler-explorer/clang-assertions-trunk-20240927/include/llvm/IR/PassManagerInternal.h:91:3
#37 0x000000000353eb80 llvm::PassManager>::run(llvm::Module&, llvm::AnalysisManager&) (/opt/compiler-explorer/clang-assertions-trunk-20240927/bin/clang-20+0x353eb80)
#38 0x0000000003e30f0b (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr>&, std::unique_ptr>&, clang::BackendConsumer*) BackendUtil.cpp:0:0
#39 0x0000000003e344cd clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr, std::unique_ptr>, clang::BackendConsumer*) (/opt/compiler-explorer/clang-assertions-trunk-20240927/bin/clang-20+0x3e344cd)
#40 0x00000000044dccde clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/compiler-explorer/clang-assertions-trunk-20240927/bin/clang-20+0x44dccde)
#41 0x00000000047d1f18 clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/compiler-explorer/clang-assertions-trunk-20240927/bin/clang-20+0x47d1f18)
#42 0x00000000065fb90c clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk-20240927/bin/clang-20+0x65fb90c)
#43 0x00000000044dd0c8 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-assertions-trunk-20240927/bin/clang-20+0x44dd0c8)
#44 0x0000000004796d49 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-assertions-trunk-20240927/bin/clang-20+0x4796d49)
#45 0x00000000047155ce clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-assertions-trunk-20240927/bin/clang-20+0x47155ce)
#46 0x000000000487c86e clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-assertions-trunk-20240927/bin/clang-20+0x487c86e)
#47 0x0000000000cceeff cc1_main(llvm::ArrayRef, char const*, void*) (/opt/compiler-explorer/clang-assertions-trunk-20240927/bin/clang-20+0xcceeff)
#48 0x0000000000cc6c0a ExecuteCC1Tool(llvm::SmallVectorImpl&, llvm::ToolContext const&) driver.cpp:0:0
#49 0x0000000000ccb54e clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-assertions-trunk-20240927/bin/clang-20+0xccb54e)
#50 0x0000000000b9b7f4 main (/opt/compiler-explorer/clang-assertions-trunk-20240927/bin/clang-20+0xb9b7f4)
#51 0x00007f9a82cbdd90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#52 0x00007f9a82cbde40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#53 0x0000000000cc66be _start (/opt/compiler-explorer/clang-assertions-trunk-20240927/bin/clang-20+0xcc66be)
clang++: error: unable to execute command: Aborted (core dumped)
clang++: error: clang frontend command failed due to signal (use -v to see invocation)
Execution build compiler returned: 254

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.