Open ms178 opened 3 days ago
I've isolated the crash due to using these flags for the Polly-Parallelizer: -mllvm -polly-parallel -fopenmp -fopenmp-version=52 -mllvm -polly-omp-backend=LLVM -mllvm -polly-num-threads=28 -mllvm -polly-scheduling=dynamic -mllvm -polly-scheduling-chunksize=1
Without these, the build compiles successfully.
@llvm/issue-subscribers-polly
Author: None (ms178)
As I was asked to post the output with -mllvm -print-on-crash -mllvm -print-module-scope
, this is what I get here:
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: /usr/bin/clang -Dturbojpeg_EXPORTS -I/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/_build -I/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src -D_FORTIFY_SOURCE=0 -O3 -march=native -mtune=native -mllvm -inline-threshold=1500 -mllvm -polly -mllvm -polly-position=early -mllvm -polly-dependences-computeout=6000000 -mllvm -polly-detect-profitability-min-per-loop-insts=40 -mllvm -polly-tiling=true -mllvm -polly-prevect-width=256 -mllvm -polly-vectorizer=stripmine -mllvm -polly-invariant-load-hoisting -mllvm -polly-loopfusion-greedy -mllvm -polly-run-inliner -mllvm -polly-run-dce -mllvm -polly-enable-delicm=true -mllvm -polly -fmerge-all-constants -mllvm -polly-parallel -fopenmp -fopenmp-version=52 -mllvm -polly-omp-backend=LLVM -mllvm -polly-num-threads=28 -mllvm -polly-scheduling=dynamic -mllvm -polly-scheduling-chunksize=1 -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 -unroll-runtime-multi-exit -mllvm -aggressive-ext-opt -mllvm -enable-interleaved-mem-accesses -mllvm -enable-masked-interleaved-mem-accesses -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 -fsplit-lto-unit -mllvm -adce-remove-loops -mllvm -enable-ext-tsp-block-placement=1 -mllvm -enable-gvn-hoist=1 -mllvm -enable-dfa-jump-thread=1 -Wno-error -fprofile-use=/home/marcus/Downloads/libjpg.profdata -fdata-sections -ffunction-sections -fno-unique-section-names -fsplit-machine-functions -mtls-dialect=gnu2 -mllvm -print-on-crash -mllvm -print-module-scope -w -O3 -DNDEBUG -std=gnu23 -fPIC -DBMP_SUPPORTED -DPPM_SUPPORTED -MD -MT CMakeFiles/turbojpeg.dir/src/transupp.c.o -MF CMakeFiles/turbojpeg.dir/src/transupp.c.o.d -o CMakeFiles/turbojpeg.dir/src/transupp.c.o -c /tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c
1. <eof> parser at end of file
2. Optimizer
3. Running pass "function(mem2reg,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;no-switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-verify-fixpoint>,instcombine<max-iterations=1;no-verify-fixpoint>,loop(indvars),polly::CodePreparationPass,polly::FunctionToScopPassAdaptor<llvm::PassManager<Scop, ScopAnalysisManager, ScopStandardAnalysisResults &, SPMUpdater &>>,sroa<modify-cfg>,early-cse<memssa>,gvn-hoist,speculative-execution<only-if-divergent-target>,jump-threading,correlated-propagation,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-verify-fixpoint>,aggressive-instcombine,libcalls-shrinkwrap,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,reassociate,constraint-elimination,loop-mssa(loop-instsimplify,loop-simplifycfg,licm<no-allowspeculation>,loop-rotate<header-duplication;no-prepare-for-lto>,licm<allowspeculation>,simple-loop-unswitch<nontrivial;trivial>,loop-flatten),simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-verify-fixpoint>,loop(loop-idiom,indvars,simple-loop-unswitch<nontrivial;trivial>,loop-deletion,loop-interchange,loop-unroll-full),sroa<modify-cfg>,vector-combine,mldst-motion<no-split-footer-bb>,gvn<>,sccp,bdce,instcombine<max-iterations=1;no-verify-fixpoint>,dfa-jump-threading,jump-threading,correlated-propagation,adce,memcpyopt,dse,move-auto-init,loop-mssa(licm<allowspeculation>),coro-elide,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-verify-fixpoint>)" on module "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c"
4. Running pass "polly::FunctionToScopPassAdaptor<llvm::PassManager<Scop, ScopAnalysisManager, ScopStandardAnalysisResults &, SPMUpdater &>>" on function "jtransform_adjust_parameters"
#0 0x0000707a14eef8e8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/bin/../lib/libLLVM.so.20.0git+0x30ef8e8)
#1 0x0000707a14eef072 llvm::sys::CleanupOnSignal(unsigned long) (/usr/bin/../lib/libLLVM.so.20.0git+0x30ef072)
#2 0x0000707a14e4cbb3 (/usr/bin/../lib/libLLVM.so.20.0git+0x304cbb3)
#3 0x0000707a11bfb530 (/usr/bin/../lib/libc.so.6+0x47530)
#4 0x0000707a1482e8d4 llvm::DominatorTreeBase<llvm::BasicBlock, false>::dominates(llvm::BasicBlock const*, llvm::BasicBlock const*) const (/usr/bin/../lib/libLLVM.so.20.0git+0x2a2e8d4)
#5 0x0000707a1693474d llvm::RegionBase<llvm::RegionTraits<llvm::Function>>::contains(llvm::BasicBlock const*) const (/usr/bin/../lib/libLLVM.so.20.0git+0x4b3474d)
#6 0x0000707a181229dd (/usr/bin/../lib/libLLVM.so.20.0git+0x63229dd)
#7 0x0000707a18122751 polly::hasScalarDepsInsideRegion(llvm::SCEV const*, llvm::Region const*, llvm::Loop*, bool, llvm::SetVector<llvm::AssertingVH<llvm::LoadInst>, llvm::SmallVector<llvm::AssertingVH<llvm::LoadInst>, 0u>, llvm::DenseSet<llvm::AssertingVH<llvm::LoadInst>, llvm::DenseMapInfo<llvm::AssertingVH<llvm::LoadInst>, void>>, 0u> const&) (/usr/bin/../lib/libLLVM.so.20.0git+0x6322751)
#8 0x0000707a181d10ce polly::VirtualUse::create(polly::Scop*, polly::ScopStmt*, llvm::Loop*, llvm::Value*, bool) (/usr/bin/../lib/libLLVM.so.20.0git+0x63d10ce)
#9 0x0000707a1819cd23 polly::BlockGenerator::getNewValue(polly::ScopStmt&, llvm::Value*, llvm::DenseMap<llvm::AssertingVH<llvm::Value>, llvm::AssertingVH<llvm::Value>, llvm::DenseMapInfo<llvm::AssertingVH<llvm::Value>, void>, llvm::detail::DenseMapPair<llvm::AssertingVH<llvm::Value>, llvm::AssertingVH<llvm::Value>>>&, llvm::DenseMap<llvm::Loop const*, llvm::SCEV const*, llvm::DenseMapInfo<llvm::Loop const*, void>, llvm::detail::DenseMapPair<llvm::Loop const*, llvm::SCEV const*>>&, llvm::Loop*) const (/usr/bin/../lib/libLLVM.so.20.0git+0x639cd23)
#10 0x0000707a1819e742 polly::BlockGenerator::copyInstScalar(polly::ScopStmt&, llvm::Instruction*, llvm::DenseMap<llvm::AssertingVH<llvm::Value>, llvm::AssertingVH<llvm::Value>, llvm::DenseMapInfo<llvm::AssertingVH<llvm::Value>, void>, llvm::detail::DenseMapPair<llvm::AssertingVH<llvm::Value>, llvm::AssertingVH<llvm::Value>>>&, llvm::DenseMap<llvm::Loop const*, llvm::SCEV const*, llvm::DenseMapInfo<llvm::Loop const*, void>, llvm::detail::DenseMapPair<llvm::Loop const*, llvm::SCEV const*>>&) (/usr/bin/../lib/libLLVM.so.20.0git+0x639e742)
#11 0x0000707a181a52f7 polly::RegionGenerator::copyStmt(polly::ScopStmt&, llvm::DenseMap<llvm::Loop const*, llvm::SCEV const*, llvm::DenseMapInfo<llvm::Loop const*, void>, llvm::detail::DenseMapPair<llvm::Loop const*, llvm::SCEV const*>>&, isl_id_to_ast_expr*) (/usr/bin/../lib/libLLVM.so.20.0git+0x63a52f7)
#12 0x0000707a1819572f polly::IslNodeBuilder::createUser(isl_ast_node*) (/usr/bin/../lib/libLLVM.so.20.0git+0x639572f)
#13 0x0000707a1818fbca polly::IslNodeBuilder::createForSequential(isl::ast_node_for, bool) (/usr/bin/../lib/libLLVM.so.20.0git+0x638fbca)
#14 0x0000707a1818f0ed polly::IslNodeBuilder::createMark(isl_ast_node*) (/usr/bin/../lib/libLLVM.so.20.0git+0x638f0ed)
#15 0x0000707a1818fbca polly::IslNodeBuilder::createForSequential(isl::ast_node_for, bool) (/usr/bin/../lib/libLLVM.so.20.0git+0x638fbca)
#16 0x0000707a18193877 polly::IslNodeBuilder::createFor(isl_ast_node*) (/usr/bin/../lib/libLLVM.so.20.0git+0x6393877)
#17 0x0000707a1818f166 polly::IslNodeBuilder::createMark(isl_ast_node*) (/usr/bin/../lib/libLLVM.so.20.0git+0x638f166)
#18 0x0000707a1818fbca polly::IslNodeBuilder::createForSequential(isl::ast_node_for, bool) (/usr/bin/../lib/libLLVM.so.20.0git+0x638fbca)
#19 0x0000707a18193877 polly::IslNodeBuilder::createFor(isl_ast_node*) (/usr/bin/../lib/libLLVM.so.20.0git+0x6393877)
#20 0x0000707a181923d3 polly::IslNodeBuilder::createForParallel(isl_ast_node*) (/usr/bin/../lib/libLLVM.so.20.0git+0x63923d3)
#21 0x0000707a181958dc polly::IslNodeBuilder::createBlock(isl_ast_node*) (/usr/bin/../lib/libLLVM.so.20.0git+0x63958dc)
#22 0x0000707a1818f166 polly::IslNodeBuilder::createMark(isl_ast_node*) (/usr/bin/../lib/libLLVM.so.20.0git+0x638f166)
#23 0x0000707a181958dc polly::IslNodeBuilder::createBlock(isl_ast_node*) (/usr/bin/../lib/libLLVM.so.20.0git+0x63958dc)
#24 0x0000707a180f6060 (/usr/bin/../lib/libLLVM.so.20.0git+0x62f6060)
#25 0x0000707a180f50aa polly::CodeGenerationPass::run(polly::Scop&, llvm::AnalysisManager<polly::Scop, polly::ScopStandardAnalysisResults&>&, polly::ScopStandardAnalysisResults&, polly::SPMUpdater&) (/usr/bin/../lib/libLLVM.so.20.0git+0x62f50aa)
#26 0x0000707a180e1a89 (/usr/bin/../lib/libLLVM.so.20.0git+0x62e1a89)
#27 0x0000707a1815cfb2 llvm::PassManager<polly::Scop, llvm::AnalysisManager<polly::Scop, polly::ScopStandardAnalysisResults&>, polly::ScopStandardAnalysisResults&, polly::SPMUpdater&>::run(polly::Scop&, llvm::AnalysisManager<polly::Scop, polly::ScopStandardAnalysisResults&>&, polly::ScopStandardAnalysisResults&, polly::SPMUpdater&) (/usr/bin/../lib/libLLVM.so.20.0git+0x635cfb2)
#28 0x0000707a180e9799 (/usr/bin/../lib/libLLVM.so.20.0git+0x62e9799)
#29 0x0000707a146212d8 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/usr/bin/../lib/libLLVM.so.20.0git+0x28212d8)
#30 0x0000707a14620f0d (/usr/bin/../lib/libLLVM.so.20.0git+0x2820f0d)
#31 0x0000707a14676e05 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/usr/bin/../lib/libLLVM.so.20.0git+0x2876e05)
#32 0x0000707a14676bed (/usr/bin/../lib/libLLVM.so.20.0git+0x2876bed)
#33 0x0000707a1494efc5 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/usr/bin/../lib/libLLVM.so.20.0git+0x2b4efc5)
#34 0x0000707a1bc8e523 (/usr/bin/../lib/libclang-cpp.so.20.0git+0x308e523)
#35 0x0000707a1a121db2 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/usr/bin/../lib/libclang-cpp.so.20.0git+0x1521db2)
#36 0x0000707a1a11f1f1 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/usr/bin/../lib/libclang-cpp.so.20.0git+0x151f1f1)
#37 0x0000707a19ee4590 clang::ParseAST(clang::Sema&, bool, bool) (/usr/bin/../lib/libclang-cpp.so.20.0git+0x12e4590)
#38 0x0000707a1ce2c770 clang::FrontendAction::Execute() (/usr/bin/../lib/libclang-cpp.so.20.0git+0x422c770)
#39 0x0000707a1cd6c25f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/bin/../lib/libclang-cpp.so.20.0git+0x416c25f)
#40 0x0000707a1ceae777 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/bin/../lib/libclang-cpp.so.20.0git+0x42ae777)
#41 0x000000000041069e cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/bin/clang+0x41069e)
#42 0x000000000040c903 (/usr/bin/clang+0x40c903)
#43 0x0000707a1c8e0899 (/usr/bin/../lib/libclang-cpp.so.20.0git+0x3ce0899)
#44 0x0000707a14e4cd9e llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/usr/bin/../lib/libLLVM.so.20.0git+0x304cd9e)
#45 0x0000707a1a18e240 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (/usr/bin/../lib/libclang-cpp.so.20.0git+0x158e240)
#46 0x0000707a1a04bb05 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/usr/bin/../lib/libclang-cpp.so.20.0git+0x144bb05)
#47 0x0000707a1c8dbd0c clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/usr/bin/../lib/libclang-cpp.so.20.0git+0x3cdbd0c)
#48 0x000000000040b31a clang_main(int, char**, llvm::ToolContext const&) (/usr/bin/clang+0x40b31a)
#49 0x0000000000409635 main (/usr/bin/clang+0x409635)
#50 0x0000707a11bda127 (/usr/bin/../lib/libc.so.6+0x26127)
#51 0x0000707a11bda1e4 __libc_start_main (/usr/bin/../lib/libc.so.6+0x261e4)
#52 0x000000000040c441 _start (/usr/bin/clang+0x40c441)
*** Dump of Module IR Before Last Pass polly::FunctionToScopPassAdaptor<llvm::PassManager<Scop, ScopAnalysisManager, ScopStandardAnalysisResults &, SPMUpdater &>> Filtered Out ***
clang: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 20.0.0git (/home/marcus/Downloads/llvm-git/llvm-project 0cb5846a68cc5c5e519b2c80ab106e7e4fc6eedb)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
transupp-d9a02e.c.txt transupp-d9a02e.sh.txt
And this one:
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: /usr/bin/clang -I/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/_build -I/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src -D_FORTIFY_SOURCE=0 -O3 -march=native -mtune=native -mllvm -inline-threshold=1500 -mllvm -polly -mllvm -polly-position=early -mllvm -polly-dependences-computeout=6000000 -mllvm -polly-detect-profitability-min-per-loop-insts=40 -mllvm -polly-tiling=true -mllvm -polly-prevect-width=256 -mllvm -polly-vectorizer=stripmine -mllvm -polly-invariant-load-hoisting -mllvm -polly-loopfusion-greedy -mllvm -polly-run-inliner -mllvm -polly-run-dce -mllvm -polly-enable-delicm=true -mllvm -polly -fmerge-all-constants -mllvm -polly-parallel -fopenmp -fopenmp-version=52 -mllvm -polly-omp-backend=LLVM -mllvm -polly-num-threads=28 -mllvm -polly-scheduling=dynamic -mllvm -polly-scheduling-chunksize=1 -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 -unroll-runtime-multi-exit -mllvm -aggressive-ext-opt -mllvm -enable-interleaved-mem-accesses -mllvm -enable-masked-interleaved-mem-accesses -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 -fsplit-lto-unit -mllvm -adce-remove-loops -mllvm -enable-ext-tsp-block-placement=1 -mllvm -enable-gvn-hoist=1 -mllvm -enable-dfa-jump-thread=1 -Wno-error -fprofile-use=/home/marcus/Downloads/libjpg.profdata -fdata-sections -ffunction-sections -fno-unique-section-names -fsplit-machine-functions -mtls-dialect=gnu2 -mllvm -print-on-crash -mllvm -print-module-scope -w -O3 -DNDEBUG -std=gnu23 -MD -MT CMakeFiles/jpegtran-static.dir/src/transupp.c.o -MF CMakeFiles/jpegtran-static.dir/src/transupp.c.o.d -o CMakeFiles/jpegtran-static.dir/src/transupp.c.o -c /tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c
1. <eof> parser at end of file
2. Optimizer
3. Running pass "function(mem2reg,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;no-switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-verify-fixpoint>,instcombine<max-iterations=1;no-verify-fixpoint>,loop(indvars),polly::CodePreparationPass,polly::FunctionToScopPassAdaptor<llvm::PassManager<Scop, ScopAnalysisManager, ScopStandardAnalysisResults &, SPMUpdater &>>,sroa<modify-cfg>,early-cse<memssa>,gvn-hoist,speculative-execution<only-if-divergent-target>,jump-threading,correlated-propagation,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-verify-fixpoint>,aggressive-instcombine,libcalls-shrinkwrap,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,reassociate,constraint-elimination,loop-mssa(loop-instsimplify,loop-simplifycfg,licm<no-allowspeculation>,loop-rotate<header-duplication;no-prepare-for-lto>,licm<allowspeculation>,simple-loop-unswitch<nontrivial;trivial>,loop-flatten),simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-verify-fixpoint>,loop(loop-idiom,indvars,simple-loop-unswitch<nontrivial;trivial>,loop-deletion,loop-interchange,loop-unroll-full),sroa<modify-cfg>,vector-combine,mldst-motion<no-split-footer-bb>,gvn<>,sccp,bdce,instcombine<max-iterations=1;no-verify-fixpoint>,dfa-jump-threading,jump-threading,correlated-propagation,adce,memcpyopt,dse,move-auto-init,loop-mssa(licm<allowspeculation>),coro-elide,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-verify-fixpoint>)" on module "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c"
4. Running pass "polly::FunctionToScopPassAdaptor<llvm::PassManager<Scop, ScopAnalysisManager, ScopStandardAnalysisResults &, SPMUpdater &>>" on function "jtransform_adjust_parameters"
#0 0x00007ee6dd2ef8e8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/bin/../lib/libLLVM.so.20.0git+0x30ef8e8)
#1 0x00007ee6dd2ef072 llvm::sys::CleanupOnSignal(unsigned long) (/usr/bin/../lib/libLLVM.so.20.0git+0x30ef072)
#2 0x00007ee6dd24cbb3 (/usr/bin/../lib/libLLVM.so.20.0git+0x304cbb3)
#3 0x00007ee6d9ffb530 (/usr/bin/../lib/libc.so.6+0x47530)
#4 0x00007ee6dcc2e8d4 llvm::DominatorTreeBase<llvm::BasicBlock, false>::dominates(llvm::BasicBlock const*, llvm::BasicBlock const*) const (/usr/bin/../lib/libLLVM.so.20.0git+0x2a2e8d4)
#5 0x00007ee6ded3474d llvm::RegionBase<llvm::RegionTraits<llvm::Function>>::contains(llvm::BasicBlock const*) const (/usr/bin/../lib/libLLVM.so.20.0git+0x4b3474d)
#6 0x00007ee6e05229dd (/usr/bin/../lib/libLLVM.so.20.0git+0x63229dd)
#7 0x00007ee6e0522751 polly::hasScalarDepsInsideRegion(llvm::SCEV const*, llvm::Region const*, llvm::Loop*, bool, llvm::SetVector<llvm::AssertingVH<llvm::LoadInst>, llvm::SmallVector<llvm::AssertingVH<llvm::LoadInst>, 0u>, llvm::DenseSet<llvm::AssertingVH<llvm::LoadInst>, llvm::DenseMapInfo<llvm::AssertingVH<llvm::LoadInst>, void>>, 0u> const&) (/usr/bin/../lib/libLLVM.so.20.0git+0x6322751)
#8 0x00007ee6e05d10ce polly::VirtualUse::create(polly::Scop*, polly::ScopStmt*, llvm::Loop*, llvm::Value*, bool) (/usr/bin/../lib/libLLVM.so.20.0git+0x63d10ce)
#9 0x00007ee6e059cd23 polly::BlockGenerator::getNewValue(polly::ScopStmt&, llvm::Value*, llvm::DenseMap<llvm::AssertingVH<llvm::Value>, llvm::AssertingVH<llvm::Value>, llvm::DenseMapInfo<llvm::AssertingVH<llvm::Value>, void>, llvm::detail::DenseMapPair<llvm::AssertingVH<llvm::Value>, llvm::AssertingVH<llvm::Value>>>&, llvm::DenseMap<llvm::Loop const*, llvm::SCEV const*, llvm::DenseMapInfo<llvm::Loop const*, void>, llvm::detail::DenseMapPair<llvm::Loop const*, llvm::SCEV const*>>&, llvm::Loop*) const (/usr/bin/../lib/libLLVM.so.20.0git+0x639cd23)
#10 0x00007ee6e059e742 polly::BlockGenerator::copyInstScalar(polly::ScopStmt&, llvm::Instruction*, llvm::DenseMap<llvm::AssertingVH<llvm::Value>, llvm::AssertingVH<llvm::Value>, llvm::DenseMapInfo<llvm::AssertingVH<llvm::Value>, void>, llvm::detail::DenseMapPair<llvm::AssertingVH<llvm::Value>, llvm::AssertingVH<llvm::Value>>>&, llvm::DenseMap<llvm::Loop const*, llvm::SCEV const*, llvm::DenseMapInfo<llvm::Loop const*, void>, llvm::detail::DenseMapPair<llvm::Loop const*, llvm::SCEV const*>>&) (/usr/bin/../lib/libLLVM.so.20.0git+0x639e742)
#11 0x00007ee6e05a52f7 polly::RegionGenerator::copyStmt(polly::ScopStmt&, llvm::DenseMap<llvm::Loop const*, llvm::SCEV const*, llvm::DenseMapInfo<llvm::Loop const*, void>, llvm::detail::DenseMapPair<llvm::Loop const*, llvm::SCEV const*>>&, isl_id_to_ast_expr*) (/usr/bin/../lib/libLLVM.so.20.0git+0x63a52f7)
#12 0x00007ee6e059572f polly::IslNodeBuilder::createUser(isl_ast_node*) (/usr/bin/../lib/libLLVM.so.20.0git+0x639572f)
#13 0x00007ee6e058fbca polly::IslNodeBuilder::createForSequential(isl::ast_node_for, bool) (/usr/bin/../lib/libLLVM.so.20.0git+0x638fbca)
#14 0x00007ee6e058f0ed polly::IslNodeBuilder::createMark(isl_ast_node*) (/usr/bin/../lib/libLLVM.so.20.0git+0x638f0ed)
#15 0x00007ee6e058fbca polly::IslNodeBuilder::createForSequential(isl::ast_node_for, bool) (/usr/bin/../lib/libLLVM.so.20.0git+0x638fbca)
#16 0x00007ee6e0593877 polly::IslNodeBuilder::createFor(isl_ast_node*) (/usr/bin/../lib/libLLVM.so.20.0git+0x6393877)
#17 0x00007ee6e058f166 polly::IslNodeBuilder::createMark(isl_ast_node*) (/usr/bin/../lib/libLLVM.so.20.0git+0x638f166)
#18 0x00007ee6e058fbca polly::IslNodeBuilder::createForSequential(isl::ast_node_for, bool) (/usr/bin/../lib/libLLVM.so.20.0git+0x638fbca)
#19 0x00007ee6e0593877 polly::IslNodeBuilder::createFor(isl_ast_node*) (/usr/bin/../lib/libLLVM.so.20.0git+0x6393877)
#20 0x00007ee6e05923d3 polly::IslNodeBuilder::createForParallel(isl_ast_node*) (/usr/bin/../lib/libLLVM.so.20.0git+0x63923d3)
#21 0x00007ee6e05958dc polly::IslNodeBuilder::createBlock(isl_ast_node*) (/usr/bin/../lib/libLLVM.so.20.0git+0x63958dc)
#22 0x00007ee6e058f166 polly::IslNodeBuilder::createMark(isl_ast_node*) (/usr/bin/../lib/libLLVM.so.20.0git+0x638f166)
#23 0x00007ee6e05958dc polly::IslNodeBuilder::createBlock(isl_ast_node*) (/usr/bin/../lib/libLLVM.so.20.0git+0x63958dc)
#24 0x00007ee6e04f6060 (/usr/bin/../lib/libLLVM.so.20.0git+0x62f6060)
#25 0x00007ee6e04f50aa polly::CodeGenerationPass::run(polly::Scop&, llvm::AnalysisManager<polly::Scop, polly::ScopStandardAnalysisResults&>&, polly::ScopStandardAnalysisResults&, polly::SPMUpdater&) (/usr/bin/../lib/libLLVM.so.20.0git+0x62f50aa)
#26 0x00007ee6e04e1a89 (/usr/bin/../lib/libLLVM.so.20.0git+0x62e1a89)
#27 0x00007ee6e055cfb2 llvm::PassManager<polly::Scop, llvm::AnalysisManager<polly::Scop, polly::ScopStandardAnalysisResults&>, polly::ScopStandardAnalysisResults&, polly::SPMUpdater&>::run(polly::Scop&, llvm::AnalysisManager<polly::Scop, polly::ScopStandardAnalysisResults&>&, polly::ScopStandardAnalysisResults&, polly::SPMUpdater&) (/usr/bin/../lib/libLLVM.so.20.0git+0x635cfb2)
#28 0x00007ee6e04e9799 (/usr/bin/../lib/libLLVM.so.20.0git+0x62e9799)
#29 0x00007ee6dca212d8 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/usr/bin/../lib/libLLVM.so.20.0git+0x28212d8)
#30 0x00007ee6dca20f0d (/usr/bin/../lib/libLLVM.so.20.0git+0x2820f0d)
#31 0x00007ee6dca76e05 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/usr/bin/../lib/libLLVM.so.20.0git+0x2876e05)
#32 0x00007ee6dca76bed (/usr/bin/../lib/libLLVM.so.20.0git+0x2876bed)
#33 0x00007ee6dcd4efc5 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/usr/bin/../lib/libLLVM.so.20.0git+0x2b4efc5)
#34 0x00007ee6e408e523 (/usr/bin/../lib/libclang-cpp.so.20.0git+0x308e523)
#35 0x00007ee6e2521db2 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/usr/bin/../lib/libclang-cpp.so.20.0git+0x1521db2)
#36 0x00007ee6e251f1f1 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/usr/bin/../lib/libclang-cpp.so.20.0git+0x151f1f1)
#37 0x00007ee6e22e4590 clang::ParseAST(clang::Sema&, bool, bool) (/usr/bin/../lib/libclang-cpp.so.20.0git+0x12e4590)
#38 0x00007ee6e522c770 clang::FrontendAction::Execute() (/usr/bin/../lib/libclang-cpp.so.20.0git+0x422c770)
#39 0x00007ee6e516c25f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/bin/../lib/libclang-cpp.so.20.0git+0x416c25f)
#40 0x00007ee6e52ae777 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/bin/../lib/libclang-cpp.so.20.0git+0x42ae777)
#41 0x000000000041069e cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/bin/clang+0x41069e)
#42 0x000000000040c903 (/usr/bin/clang+0x40c903)
#43 0x00007ee6e4ce0899 (/usr/bin/../lib/libclang-cpp.so.20.0git+0x3ce0899)
#44 0x00007ee6dd24cd9e llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/usr/bin/../lib/libLLVM.so.20.0git+0x304cd9e)
#45 0x00007ee6e258e240 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (/usr/bin/../lib/libclang-cpp.so.20.0git+0x158e240)
#46 0x00007ee6e244bb05 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/usr/bin/../lib/libclang-cpp.so.20.0git+0x144bb05)
#47 0x00007ee6e4cdbd0c clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/usr/bin/../lib/libclang-cpp.so.20.0git+0x3cdbd0c)
#48 0x000000000040b31a clang_main(int, char**, llvm::ToolContext const&) (/usr/bin/clang+0x40b31a)
#49 0x0000000000409635 main (/usr/bin/clang+0x409635)
#50 0x00007ee6d9fda127 (/usr/bin/../lib/libc.so.6+0x26127)
#51 0x00007ee6d9fda1e4 __libc_start_main (/usr/bin/../lib/libc.so.6+0x261e4)
#52 0x000000000040c441 _start (/usr/bin/clang+0x40c441)
*** Dump of Module IR Before Last Pass polly::FunctionToScopPassAdaptor<llvm::PassManager<Scop, ScopAnalysisManager, ScopStandardAnalysisResults &, SPMUpdater &>> Filtered Out ***
clang: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 20.0.0git (/home/marcus/Downloads/llvm-git/llvm-project 0cb5846a68cc5c5e519b2c80ab106e7e4fc6eedb)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
I encountered a crash in Clang 20.0git 0cb5846a68cc5c5e519b2c80ab106e7e4fc6eedb while compiling the libjpeg-turbo-git (3.0.90.r10.g9758c8a7) library with aggressive optimizations, including Polly, OpenMP, and LTO. The crash occurs during the compilation of
src/transupp.c
, specifically within the functionjtransform_adjust_parameters
.1. Crash Information:
src/transupp.c
(from libjpeg-turbo)jtransform_adjust_parameters
Crash Output/Stack Trace:
transupp-2fe439.c.txt transupp-2fe439.sh.txt transupp-f787bc.c.txt transupp-f787bc.sh.txt
Additional Notes: