Swift 5.9.2 Crash while running GlobalPropertyOpt SIL Optimization

Github Issue: Swift 5.9.2 Crash while running GlobalPropertyOpt SIL Optimization · Issue #71274 · apple/swift · GitHub

We're getting a compiler crash while running release builds (build with optimization).

Wasn't able to reproduce the issue because the module that's being built contains hundreds of swift files.

Stack trace

1.	Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
2.	Compiling with the current language version
---
4.	While evaluating request ExecuteSILPipelineRequest(Run pipelines { PrepareOptimizationPasses, EarlyModulePasses, HighLevel,Function+EarlyLoopOpt, HighLevel,Module+StackPromote, MidLevel,Function, ClosureSpecialize, LowLevel,Function, LateLoopOpt, SIL Debug Info Generator } on SIL for FaireCore)
5.	While running pass #1016146 SILModuleTransform "GlobalPropertyOpt".
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  swift-frontend           0x00000001034d1abc llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1  swift-frontend           0x0000000106137cb0 llvm::sys::RunSignalHandlers() + 112
2  swift-frontend           0x0000000105ea1054 SignalHandler(int) + 352
3  libsystem_platform.dylib 0x00000001822b9a24 _sigtramp + 56
4  swift-frontend           0x0000000104ce5cc0 (anonymous namespace)::GlobalPropertyOptPass::run() (.llvm.12442508139722679464) + 4996
5  swift-frontend           0x0000000105ad8874 swift::SILPassManager::executePassPipelinePlan(swift::SILPassPipelinePlan const&) + 16276
6  swift-frontend           0x0000000105c821c4 swift::SimpleRequest<swift::ExecuteSILPipelineRequest, std::__1::tuple<> (swift::SILPipelineExecutionDescriptor), (swift::RequestFlags)1>::evaluateRequest(swift::ExecuteSILPipelineRequest const&, swift::Evaluator&) + 56
7  swift-frontend           0x0000000105b246b8 llvm::Expected<swift::ExecuteSILPipelineRequest::OutputType> swift::Evaluator::getResultUncached<swift::ExecuteSILPipelineRequest>(swift::ExecuteSILPipelineRequest const&) + 476
8  swift-frontend           0x0000000105b3c424 swift::runSILOptimizationPasses(swift::SILModule&) + 472
9  swift-frontend           0x0000000103acc3c0 swift::CompilerInstance::performSILProcessing(swift::SILModule*) + 572
10 swift-frontend           0x0000000105a19454 performCompileStepsPostSILGen(swift::CompilerInstance&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule>>, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::PrimarySpecificPaths const&, int&, swift::FrontendObserver*) + 956
11 swift-frontend           0x0000000105a14f00 performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 3020
12 swift-frontend           0x0000000105a18854 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 4568
13 swift-frontend           0x0000000105a7fd44 swift::mainEntry(int, char const**) + 4408
14 dyld                     0x0000000181f090e0 start + 2360
zsh: segmentation fault  LLVM_SYMBOLIZER_PATH=  -c -filelist  -supplementary-output-file-map 

Setting the path for LLVM_SYMBOLIZER_PATH doesn't have any effect.

Need some help to colect further information to debug this issue and find the root cause.

I'm trying to run the optimization phase manually but I'm not having success building swift/lib/SILOptimizer/IPO that contains the GlobalPropertyOpt optimization pass.