[llvm] [CGP] Bail out if (Base|Scaled)Reg does not dominate insert point. (PR #142949)

Alexander Kornienko via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 5 12:56:11 PDT 2025


alexfh wrote:

Thanks for the prompt fix! Please take a look at buildkite checks. I see seemingly relevant crashes there:
```
2025-06-05T17:39:36.4331784Z 1.	<eof> parser at end of file
2025-06-05T17:39:36.4332317Z 2.	Code generation
2025-06-05T17:39:36.4333454Z 3.	Running pass 'Function Pass Manager' on module '/home/gha/actions-runner/_work/llvm-project/llvm-project/libcxx/src/algorithm.cpp'.
2025-06-05T17:39:36.4336186Z 4.	Running pass 'CodeGen Prepare' on function '@_ZNSt3__111__introsortINS_17_ClassicAlgPolicyENS_6ranges4lessEPcLb1EEEvT1_S5_T0_NS_15iterator_traitsIS5_E15difference_typeEb'
2025-06-05T17:39:36.4343353Z  #0 0x0000581ee69b0f48 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:804:13
2025-06-05T17:39:36.4345934Z  #1 0x0000581ee69ae9fe llvm::sys::RunSignalHandlers() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Signals.cpp:106:18
2025-06-05T17:39:36.4348253Z  #2 0x0000581ee6915ac6 HandleCrash /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
2025-06-05T17:39:36.4350591Z  #3 0x0000581ee6915ac6 CrashRecoverySignalHandler(int) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
2025-06-05T17:39:36.4352542Z  #4 0x00007e5e82c34330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
2025-06-05T17:39:36.4354123Z  #5 0x0000581ee62ed898 getNode /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:402:5
2025-06-05T17:39:36.4356171Z  #6 0x0000581ee62ed898 isReachableFromEntry /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:459:33
2025-06-05T17:39:36.4358884Z  #7 0x0000581ee62ed898 llvm::DominatorTree::dominates(llvm::Value const*, llvm::Instruction const*) const /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/Dominators.cpp:161:8
2025-06-05T17:39:36.4362452Z  #8 0x0000581ee5c77143 (anonymous namespace)::CodeGenPrepare::optimizeMemoryInst(llvm::Instruction*, llvm::Value*, llvm::Type*, unsigned int) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/CodeGenPrepare.cpp:5952:76
2025-06-05T17:39:36.4365431Z  #9 0x0000581ee5c6367b optimizeBlock /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/CodeGenPrepare.cpp:8903:18
2025-06-05T17:39:36.4367777Z #10 0x0000581ee5c6367b (anonymous namespace)::CodeGenPrepare::_run(llvm::Function&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/CodeGenPrepare.cpp:659:22
2025-06-05T17:39:36.4370706Z #11 0x0000581ee5c612d8 (anonymous namespace)::CodeGenPrepareLegacyPass::runOnFunction(llvm::Function&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/CodeGenPrepare.cpp:529:14
2025-06-05T17:39:36.4373989Z #12 0x0000581ee636f475 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1407:27
2025-06-05T17:39:36.4376627Z #13 0x0000581ee6377762 llvm::FPPassManager::runOnModule(llvm::Module&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1453:13
2025-06-05T17:39:36.4378873Z #14 0x0000581ee636fee6 runOnModule /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1522:27
2025-06-05T17:39:36.4381162Z #15 0x0000581ee636fee6 llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:540:44
2025-06-05T17:39:36.4383634Z #16 0x0000581ee7125200 RunCodegenPipeline /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1263:9
2025-06-05T17:39:36.4385741Z #17 0x0000581ee7125200 emitAssembly /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1286:3
2025-06-05T17:39:36.4390324Z #18 0x0000581ee7125200 clang::emitBackendOutput(clang::CompilerInstance&, clang::CodeGenOptions&, 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*) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1451:13
2025-06-05T17:39:36.4394596Z #19 0x0000581ee713a8f3 ~unique_ptr /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:403:6
2025-06-05T17:39:36.4397236Z #20 0x0000581ee713a8f3 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:316:3
2025-06-05T17:39:36.4399429Z #21 0x0000581ee8e28809 __normal_iterator /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_iterator.h:1077:20
2025-06-05T17:39:36.4401013Z #22 0x0000581ee8e28809 begin /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_vector.h:874:16
2025-06-05T17:39:36.4405305Z #23 0x0000581ee8e28809 finalize<std::vector<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback> >, std::allocator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback> > > > > /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/include/clang/Sema/TemplateInstCallback.h:54:16
2025-06-05T17:39:36.4409646Z #24 0x0000581ee8e28809 clang::ParseAST(clang::Sema&, bool, bool) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Parse/ParseAST.cpp:190:3
2025-06-05T17:39:36.4412059Z #25 0x0000581ee76d37d6 clang::FrontendAction::Execute() /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1225:10
2025-06-05T17:39:36.4414228Z #26 0x0000581ee76432fd getPtr /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Error.h:278:42
2025-06-05T17:39:36.4416017Z #27 0x0000581ee76432fd operator bool /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Error.h:241:16
2025-06-05T17:39:36.4418588Z #28 0x0000581ee76432fd clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1055:23
2025-06-05T17:39:36.4421958Z #29 0x0000581ee77bac52 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:300:25
2025-06-05T17:39:36.4424929Z #30 0x0000581ee3e52bdd cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/tools/driver/cc1_main.cpp:297:15
...
```

https://github.com/llvm/llvm-project/pull/142949


More information about the llvm-commits mailing list