Issue 148681
Summary [DirectX] `ScalarizierPass` does not invalidate analyses after modifying function
Labels backend:DirectX
Assignees
Reporter inbelic
    The `llc-vector-store-scalarize.ll` test case fails when running with `DLLVM_ENABLE_EXPENSIVE_CHECKS` enabled.

It causes us to reach and report a fatal error, (here)[https://github.com/llvm/llvm-project/blob/f78d6caadc60b58a6cf390efc2b3d2da7a21caef/llvm/lib/Passes/StandardInstrumentations.cpp#L1413], and reports the following:

```
LLVM ERROR: Function @store_array_vec_test changed by ScalarizerPass without invalidating analyses
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: llvm-project/build/bin/opt -S -passes=dxil-data-scalarization,scalarizer<load-store>,dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library llvm-project/llvm/test/CodeGen/DirectX/llc-vector-store-scalarize.ll
1. Running pass "function(scalarizer)" on module "llvm-project/llvm/test/CodeGen/DirectX/llc-vector-store-scalarize.ll"
 #0 0x00005b83e8064bb7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (llvm-project/build/bin/opt+0x1fe9bb7)
 #1 0x00005b83e8062235 llvm::sys::RunSignalHandlers() (llvm-project/build/bin/opt+0x1fe7235)
 #2 0x00005b83e80659fe SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #3 0x0000730f21442520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x0000730f214969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #5 0x0000730f21442476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #6 0x0000730f214287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #7 0x00005b83e804be54 llvm::report_fatal_error(llvm::Twine const&, bool) (llvm-project/build/bin/opt+0x1fd0e54)
 #8 0x00005b83e9a29161 void llvm::detail::UniqueFunctionBase<void, llvm::StringRef, llvm::Any, llvm::PreservedAnalyses const&>::CallImpl<llvm::PreservedCFGCheckerInstrumentation::registerCallbacks(llvm::PassInstrumentationCallbacks&, llvm::AnalysisManager<llvm::Module>&)::$_18>(void*, llvm::StringRef, llvm::Any&, llvm::PreservedAnalyses const&) StandardInstrumentations.cpp:0:0
 #9 0x00005b83e82cfa52 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (llvm-project/build/bin/opt+0x2254a52)
#10 0x00005b83e95c3d9d llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) X86CodeGenPassBuilder.cpp:0:0
#11 0x00005b83e82c8321 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (llvm-project/build/bin/opt+0x224d321)
#12 0x00005b83e99f86ba llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::PassPlugin>, llvm::ArrayRef<std::function<void (llvm::PassBuilder&)>>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool, bool) (llvm-project/build/bin/opt+0x397d6ba)
#13 0x00005b83e8024850 optMain (llvm-project/build/bin/opt+0x1fa9850)
#14 0x0000730f21429d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#15 0x0000730f21429e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#16 0x00005b83e801e1a5 _start (llvm-project/build/bin/opt+0x1fa31a5)
FileCheck error: '<stdin>' is empty.
FileCheck command line:  llvm-project/build/bin/FileCheck llvm-project/llvm/test/CodeGen/DirectX/llc-vector-store-scalarize.ll
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to