<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/64875>64875</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Option -polly-dump-before-file at -polly-position=late not supported with NPM
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          hiraditya
      </td>
    </tr>
</table>

<pre>
    Repro
```sh
$ touch a.c

$ clang -O3 -ffast-math -fvectorize -fpic  -mllvm -polly -mllvm -polly-dump-before-file=before-polly.ll 


fatal error: error in backend: Option -polly-dump-before-file at -polly-position=late not supported with NPM
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-trunk/bin/clang++ -gdwarf-4 -g -o /app/output.s -S --gcc-toolchain=/opt/compiler-explorer/gcc-snapshot -fcolor-diagnostics -fno-crash-diagnostics -O3 -ffast-math -fvectorize -fpic -mllvm -polly -mllvm -polly-dump-before-file=before-polly.ll <source> -isystem/opt/compiler-explorer/libs/google-benchmark/v1.4.0/include
1.      <eof> parser at end of file
 #0 0x000000000339ebc8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x339ebc8)
 #1 0x000000000339ccf4 llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x339ccf4)
 #2 0x00000000032eea83 llvm::CrashRecoveryContext::HandleExit(int) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x32eea83)
 #3 0x000000000339473e llvm::sys::Process::Exit(int, bool) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x339473e)
 #4 0x0000000000bdeba6 (/opt/compiler-explorer/clang-trunk/bin/clang+++0xbdeba6)
 #5 0x00000000032f7ab3 llvm::report_fatal_error(llvm::Twine const&, bool) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x32f7ab3)
 #6 0x00000000032f7c18 (/opt/compiler-explorer/clang-trunk/bin/clang+++0x32f7c18)
 #7 0x00000000045eabce polly::buildLatePollyPipeline(llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>&, llvm::OptimizationLevel) RegisterPasses.cpp:0:0
 #8 0x00000000047ce818 llvm::PassBuilder::invokeVectorizerStartEPCallbacks(llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>&, llvm::OptimizationLevel) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x47ce818)
 #9 0x00000000047d998a llvm::PassBuilder::buildModuleOptimizationPipeline(llvm::OptimizationLevel, llvm::ThinOrFullLTOPhase) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x47d998a)
#10 0x00000000047da96e llvm::PassBuilder::buildPerModuleDefaultPipeline(llvm::OptimizationLevel, bool) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x47da96e)
#11 0x00000000036053f8 (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&) BackendUtil.cpp:0:0
#12 0x000000000360714f 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>>) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x360714f)
#13 0x0000000004586c4c clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x4586c4c)
#14 0x0000000005970089 clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5970089)
#15 0x00000000045862d5 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-trunk/bin/clang+++0x45862d5)
#16 0x0000000003e3a771 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3e3a771)
#17 0x0000000003dbd63b clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3dbd63b)
#18 0x0000000003f1b813 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3f1b813)
#19 0x0000000000be0165 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0xbe0165)
#20 0x0000000000bd937d ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#21 0x0000000003c05e19 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#22 0x00000000032ee983 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x32ee983)
#23 0x0000000003c06039 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (.part.0) Job.cpp:0:0
#24 0x0000000003bce1c7 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3bce1c7)
#25 0x0000000003bceb7d clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3bceb7d)
#26 0x0000000003bd892c clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3bd892c)
#27 0x0000000000bddd11 clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0xbddd11)
#28 0x0000000000ad98c1 main (/opt/compiler-explorer/clang-trunk/bin/clang+++0xad98c1)
#29 0x00007fe218c43083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#30 0x0000000000bd8b7e _start (/opt/compiler-explorer/clang-trunk/bin/clang+++0xbd8b7e)
Compiler returned: 1
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzkWV1zozrS_jXkRoULhD_gIheOE7_nTGXeuOKcvXUJ0WDtCImVRBKfX78lhGPkOMnsDvtRtVOeGVsS6qefftTdANGaVQLgOpjdBLPbK9KavVTXe6ZIwcyBXOWyOFw_QqNkEN0G0TKYR-6j9_0AniIjW7pHZEL7obcJyomoUPiQoLAsiTZhTcweheUzUCMV-xNQWDaMIhTWnD_XKGwk5wf_V1i0dRPmUEoFYck4BMlt_6ubn3COPLvdvyUxhCNQSqogWboviAmUE_oDRGHHHhrDpPjICiLmONVIzezSILnlxAAS0iDdNo1UBgr0wswe_f_mu7O7ub9bbu-QbvOaGURQ3lZIgV2KjER7YxodJMsArwO8rpjZt_mEyjrAa-tx_1_YKPlXoCbAa6Z1CzrAa0REgZigvC0AmT0gqojed-4YRSgEeIUaZeNEQWsokJatcsP2SqK1pIxYvKoVSFPFGjNxkLeG0B_I-m-RdUPRJIiyjZKVIjUiqmprEMYCRwFey8Yio7JuGAcVwmvDpQJlx2y4Q6Na8SPA65yJ41iAbwJ8g8KqeCGqDKcorFAo7WakaeyWrWlaM9Eo3KIwrCgNjZSc7gmzpH9q0y7WgjR6Lw0KSyq5VGHBSCWkNoxqFJZ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