llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[MLIR] Crash during `-gpu-module-to-binary` when `llvm.mlir.constant` references missing dense_resource

Open frida-albrecht opened this issue 2 months ago • 3 comments

Description

The compiler crashes when running -gpu-module-to-binary on an MLIR module containing an llvm.mlir.constant operation that references a non-existent dense_resource.

The parser reports that the resource does not exist, but the compilation continues into LLVM IR translation. During translation of the following llvm.icmp operation, a null llvm::Value is passed to LLVM's IRBuilder::CreateICmp, which triggers an assertion failure in llvm::dyn_cast.

Tested commit

3b8ee89

Test case

module attributes {gpu.container_module} {
  gpu.module @main_kernel [#nvvm.target] {
    llvm.func @main_kernel(%arg0: vector<128xi32>, %arg1: vector<128xi32>) attributes {gpu.kernel, nvvm.kernel} {
      %0 = llvm.mlir.constant(dense_resource<__elided__> : vector<128xi32>) : vector<128xi32>
      %1 = llvm.ashr %arg0, %arg1 : vector<128xi32>
      %2 = llvm.icmp "sgt" %1, %0 : vector<128xi32>
      llvm.return
    }
  }
}

Steps to reproduce

mlir-opt test.mlir  -gpu-module-to-binary

stack trace

test1.mlir:4:12: error: resource does not exist
      %0 = llvm.mlir.constant(dense_resource<__elided__> : vector<128xi32>) : vector<128xi32>
           ^
mlir-opt: /home/workdir/llvm-project-latest/llvm/include/llvm/Support/Casting.h:656: decltype(auto) llvm::dyn_cast(From *) [To = llvm::Constant, From = llvm::Value]: Assertion `detail::isPresent(Val) && "dyn_cast on a non-existent value"' failed.                                                                
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0.      Program arguments: mlir-opt test.mlir -gpu-module-to-binary
 #0 0x0000556ec6953d0b llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (../llvm-project-latest/build/bin/mlir-opt+0x1fc2d0b)
 #1 0x0000556ec6950b11 llvm::sys::RunSignalHandlers() (../llvm-project-latest/build/bin/mlir-opt+0x1fbfb11)
 #2 0x0000556ec6954a3b SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #3 0x00007f733c007520 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x00007f733c05b9fc pthread_kill (/usr/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #5 0x00007f733c007476 gsignal (/usr/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #6 0x00007f733bfed7f3 abort (/usr/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #7 0x00007f733bfed71b (/usr/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
 #8 0x00007f733bffee96 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
 #9 0x0000556ecbb00a52 llvm::TargetFolder::FoldGEP(llvm::Type*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::GEPNoWrapFlags) const (../llvm-project-latest/build/bin/mlir-opt+0x716fa52)
#10 0x0000556ec7d3fb84 llvm::IRBuilderBase::CreateICmp(llvm::CmpInst::Predicate, llvm::Value*, llvm::Value*, llvm::Twine const&) (../llvm-project-latest/build/bin/mlir-opt+0x33aeb84)
#11 0x0000556ec7d2e81d convertOperationImpl(mlir::Operation&, llvm::IRBuilderBase&, mlir::LLVM::ModuleTranslation&) LLVMToLLVMIRTranslation.cpp:0:0
#12 0x0000556ecb3cbfd6 mlir::LLVM::ModuleTranslation::convertOperationImpl(mlir::Operation&, llvm::IRBuilderBase&, bool) (../llvm-project-latest/build/bin/mlir-opt+0x6a3afd6)
#13 0x0000556ecb3cc758 mlir::LLVM::ModuleTranslation::convertBlockImpl(mlir::Block&, bool, llvm::IRBuilderBase&, bool) (../llvm-project-latest/build/bin/mlir-opt+0x6a3b758)
#14 0x0000556ecb3d2ef4 mlir::LLVM::ModuleTranslation::convertOneFunction(mlir::LLVM::LLVMFuncOp) (../llvm-project-latest/build/bin/mlir-opt+0x6a41ef4)
#15 0x0000556ecb3d6913 mlir::LLVM::ModuleTranslation::convertFunctions() (../llvm-project-latest/build/bin/mlir-opt+0x6a45913)
#16 0x0000556ecb3da8d3 mlir::translateModuleToLLVMIR(mlir::Operation*, llvm::LLVMContext&, llvm::StringRef, bool, llvm::vfs::FileSystem*) (../llvm-project-latest/build/bin/mlir-opt+0x6a498d3)
#17 0x0000556ec8e41488 mlir::LLVM::ModuleToObject::run() (../llvm-project-latest/build/bin/mlir-opt+0x44b0488)
#18 0x0000556ec876459e mlir::gpu::detail::TargetAttrInterfaceInterfaceTraits::FallbackModel<(anonymous namespace)::NVVMTargetAttrImpl>::serializeToObject(mlir::gpu::detail::TargetAttrInterfaceInterfaceTraits::Concept const*, mlir::Attribute, mlir::Operation*, mlir::gpu::TargetOptions const&) Target.cpp:0:0
#19 0x0000556ecd8098bf mlir::gpu::TargetAttrInterface::serializeToObject(mlir::Operation*, mlir::gpu::TargetOptions const&) const (../llvm-project-latest/build/bin/mlir-opt+0x8e788bf)
#20 0x0000556ec8531494 mlir::gpu::transformGpuModulesToBinaries(mlir::Operation*, mlir::gpu::OffloadingLLVMTranslationAttrInterface, mlir::gpu::TargetOptions const&) (../llvm-project-latest/build/bin/mlir-opt+0x3ba0494)
#21 0x0000556ec8532547 (anonymous namespace)::GpuModuleToBinaryPass::runOnOperation() ModuleToBinary.cpp:0:0
#22 0x0000556eceb533ee mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (../llvm-project-latest/build/bin/mlir-opt+0xa1c23ee)
#23 0x0000556eceb54364 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (../llvm-project-latest/build/bin/mlir-opt+0xa1c3364)
#24 0x0000556eceb5b0fa mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) (../llvm-project-latest/build/bin/mlir-opt+0xa1ca0fa)
#25 0x0000556eceb5aa5d mlir::PassManager::run(mlir::Operation*) (../llvm-project-latest/build/bin/mlir-opt+0xa1c9a5d)
#26 0x0000556ec69ff58f performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#27 0x0000556ec69fe761 llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef const&, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::$_0>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef const&, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#28 0x0000556eceeadec6 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef const&, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) (../llvm-project-latest/build/bin/mlir-opt+0xa51cec6)
#29 0x0000556ec69f4ba6 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (../llvm-project-latest/build/bin/mlir-opt+0x2063ba6)
#30 0x0000556ec69f4f7a mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (../llvm-project-latest/build/bin/mlir-opt+0x2063f7a)
#31 0x0000556ec69f51eb mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (../llvm-project-latest/build/bin/mlir-opt+0x20641eb)
#32 0x0000556ec69397cd main (../llvm-project-latest/build/bin/mlir-opt+0x1fa87cd)
#33 0x00007f733bfeed90 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#34 0x00007f733bfeee40 __libc_start_main (/usr/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#35 0x0000556ec6939325 _start (../llvm-project-latest/build/bin/mlir-opt+0x1fa8325)
Aborted (core dumped)

frida-albrecht avatar Sep 19 '26 07:09 frida-albrecht

@llvm/issue-subscribers-mlir

Author: frida-albrecht

### Description

The compiler crashes when running -gpu-module-to-binary on an MLIR module containing an llvm.mlir.constant operation that references a non-existent dense_resource.

The parser reports that the resource does not exist, but the compilation continues into LLVM IR translation. During translation of the following llvm.icmp operation, a null llvm::Value is passed to LLVM's IRBuilder::CreateICmp, which triggers an assertion failure in llvm::dyn_cast.

Tested commit

3b8ee89

Test case

module attributes {gpu.container_module} {
  gpu.module @<!-- -->main_kernel [#nvvm.target] {
    llvm.func @<!-- -->main_kernel(%arg0: vector&lt;128xi32&gt;, %arg1: vector&lt;128xi32&gt;) attributes {gpu.kernel, nvvm.kernel} {
      %0 = llvm.mlir.constant(dense_resource&lt;__elided__&gt; : vector&lt;128xi32&gt;) : vector&lt;128xi32&gt;
      %1 = llvm.ashr %arg0, %arg1 : vector&lt;128xi32&gt;
      %2 = llvm.icmp "sgt" %1, %0 : vector&lt;128xi32&gt;
      llvm.return
    }
  }
}

Steps to reproduce

mlir-opt test.mlir  -gpu-module-to-binary

stack trace

test1.mlir:4:12: error: resource does not exist
      %0 = llvm.mlir.constant(dense_resource&lt;__elided__&gt; : vector&lt;128xi32&gt;) : vector&lt;128xi32&gt;
           ^
mlir-opt: /home/workdir/llvm-project-latest/llvm/include/llvm/Support/Casting.h:656: decltype(auto) llvm::dyn_cast(From *) [To = llvm::Constant, From = llvm::Value]: Assertion `detail::isPresent(Val) &amp;&amp; "dyn_cast on a non-existent value"' failed.                                                                
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0.      Program arguments: mlir-opt test.mlir -gpu-module-to-binary
 #<!-- -->0 0x0000556ec6953d0b llvm::sys::PrintStackTrace(llvm::raw_ostream&amp;, int) (../llvm-project-latest/build/bin/mlir-opt+0x1fc2d0b)
 #<!-- -->1 0x0000556ec6950b11 llvm::sys::RunSignalHandlers() (../llvm-project-latest/build/bin/mlir-opt+0x1fbfb11)
 #<!-- -->2 0x0000556ec6954a3b SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #<!-- -->3 0x00007f733c007520 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #<!-- -->4 0x00007f733c05b9fc pthread_kill (/usr/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #<!-- -->5 0x00007f733c007476 gsignal (/usr/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #<!-- -->6 0x00007f733bfed7f3 abort (/usr/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #<!-- -->7 0x00007f733bfed71b (/usr/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
 #<!-- -->8 0x00007f733bffee96 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
 #<!-- -->9 0x0000556ecbb00a52 llvm::TargetFolder::FoldGEP(llvm::Type*, llvm::Value*, llvm::ArrayRef&lt;llvm::Value*&gt;, llvm::GEPNoWrapFlags) const (../llvm-project-latest/build/bin/mlir-opt+0x716fa52)
#<!-- -->10 0x0000556ec7d3fb84 llvm::IRBuilderBase::CreateICmp(llvm::CmpInst::Predicate, llvm::Value*, llvm::Value*, llvm::Twine const&amp;) (../llvm-project-latest/build/bin/mlir-opt+0x33aeb84)
#<!-- -->11 0x0000556ec7d2e81d convertOperationImpl(mlir::Operation&amp;, llvm::IRBuilderBase&amp;, mlir::LLVM::ModuleTranslation&amp;) LLVMToLLVMIRTranslation.cpp:0:0
#<!-- -->12 0x0000556ecb3cbfd6 mlir::LLVM::ModuleTranslation::convertOperationImpl(mlir::Operation&amp;, llvm::IRBuilderBase&amp;, bool) (../llvm-project-latest/build/bin/mlir-opt+0x6a3afd6)
#<!-- -->13 0x0000556ecb3cc758 mlir::LLVM::ModuleTranslation::convertBlockImpl(mlir::Block&amp;, bool, llvm::IRBuilderBase&amp;, bool) (../llvm-project-latest/build/bin/mlir-opt+0x6a3b758)
#<!-- -->14 0x0000556ecb3d2ef4 mlir::LLVM::ModuleTranslation::convertOneFunction(mlir::LLVM::LLVMFuncOp) (../llvm-project-latest/build/bin/mlir-opt+0x6a41ef4)
#<!-- -->15 0x0000556ecb3d6913 mlir::LLVM::ModuleTranslation::convertFunctions() (../llvm-project-latest/build/bin/mlir-opt+0x6a45913)
#<!-- -->16 0x0000556ecb3da8d3 mlir::translateModuleToLLVMIR(mlir::Operation*, llvm::LLVMContext&amp;, llvm::StringRef, bool, llvm::vfs::FileSystem*) (../llvm-project-latest/build/bin/mlir-opt+0x6a498d3)
#<!-- -->17 0x0000556ec8e41488 mlir::LLVM::ModuleToObject::run() (../llvm-project-latest/build/bin/mlir-opt+0x44b0488)
#<!-- -->18 0x0000556ec876459e mlir::gpu::detail::TargetAttrInterfaceInterfaceTraits::FallbackModel&lt;(anonymous namespace)::NVVMTargetAttrImpl&gt;::serializeToObject(mlir::gpu::detail::TargetAttrInterfaceInterfaceTraits::Concept const*, mlir::Attribute, mlir::Operation*, mlir::gpu::TargetOptions const&amp;) Target.cpp:0:0
#<!-- -->19 0x0000556ecd8098bf mlir::gpu::TargetAttrInterface::serializeToObject(mlir::Operation*, mlir::gpu::TargetOptions const&amp;) const (../llvm-project-latest/build/bin/mlir-opt+0x8e788bf)
#<!-- -->20 0x0000556ec8531494 mlir::gpu::transformGpuModulesToBinaries(mlir::Operation*, mlir::gpu::OffloadingLLVMTranslationAttrInterface, mlir::gpu::TargetOptions const&amp;) (../llvm-project-latest/build/bin/mlir-opt+0x3ba0494)
#<!-- -->21 0x0000556ec8532547 (anonymous namespace)::GpuModuleToBinaryPass::runOnOperation() ModuleToBinary.cpp:0:0
#<!-- -->22 0x0000556eceb533ee mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (../llvm-project-latest/build/bin/mlir-opt+0xa1c23ee)
#<!-- -->23 0x0000556eceb54364 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&amp;, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (../llvm-project-latest/build/bin/mlir-opt+0xa1c3364)
#<!-- -->24 0x0000556eceb5b0fa mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) (../llvm-project-latest/build/bin/mlir-opt+0xa1ca0fa)
#<!-- -->25 0x0000556eceb5aa5d mlir::PassManager::run(mlir::Operation*) (../llvm-project-latest/build/bin/mlir-opt+0xa1c9a5d)
#<!-- -->26 0x0000556ec69ff58f performActions(llvm::raw_ostream&amp;, std::shared_ptr&lt;llvm::SourceMgr&gt; const&amp;, mlir::MLIRContext*, mlir::MlirOptMainConfig const&amp;) MlirOptMain.cpp:0:0
#<!-- -->27 0x0000556ec69fe761 llvm::LogicalResult llvm::function_ref&lt;llvm::LogicalResult (std::unique_ptr&lt;llvm::MemoryBuffer, std::default_delete&lt;llvm::MemoryBuffer&gt;&gt;, llvm::MemoryBufferRef const&amp;, llvm::raw_ostream&amp;)&gt;::callback_fn&lt;mlir::MlirOptMain(llvm::raw_ostream&amp;, std::unique_ptr&lt;llvm::MemoryBuffer, std::default_delete&lt;llvm::MemoryBuffer&gt;&gt;, mlir::DialectRegistry&amp;, mlir::MlirOptMainConfig const&amp;)::$_0&gt;(long, std::unique_ptr&lt;llvm::MemoryBuffer, std::default_delete&lt;llvm::MemoryBuffer&gt;&gt;, llvm::MemoryBufferRef const&amp;, llvm::raw_ostream&amp;) MlirOptMain.cpp:0:0
#<!-- -->28 0x0000556eceeadec6 mlir::splitAndProcessBuffer(std::unique_ptr&lt;llvm::MemoryBuffer, std::default_delete&lt;llvm::MemoryBuffer&gt;&gt;, llvm::function_ref&lt;llvm::LogicalResult (std::unique_ptr&lt;llvm::MemoryBuffer, std::default_delete&lt;llvm::MemoryBuffer&gt;&gt;, llvm::MemoryBufferRef const&amp;, llvm::raw_ostream&amp;)&gt;, llvm::raw_ostream&amp;, llvm::StringRef, llvm::StringRef) (../llvm-project-latest/build/bin/mlir-opt+0xa51cec6)
#<!-- -->29 0x0000556ec69f4ba6 mlir::MlirOptMain(llvm::raw_ostream&amp;, std::unique_ptr&lt;llvm::MemoryBuffer, std::default_delete&lt;llvm::MemoryBuffer&gt;&gt;, mlir::DialectRegistry&amp;, mlir::MlirOptMainConfig const&amp;) (../llvm-project-latest/build/bin/mlir-opt+0x2063ba6)
#<!-- -->30 0x0000556ec69f4f7a mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&amp;) (../llvm-project-latest/build/bin/mlir-opt+0x2063f7a)
#<!-- -->31 0x0000556ec69f51eb mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&amp;) (../llvm-project-latest/build/bin/mlir-opt+0x20641eb)
#<!-- -->32 0x0000556ec69397cd main (../llvm-project-latest/build/bin/mlir-opt+0x1fa87cd)
#<!-- -->33 0x00007f733bfeed90 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#<!-- -->34 0x00007f733bfeee40 __libc_start_main (/usr/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#<!-- -->35 0x0000556ec6939325 _start (../llvm-project-latest/build/bin/mlir-opt+0x1fa8325)
Aborted (core dumped)

hi, I would like to take a look at this

Naaz30 avatar Sep 19 '26 10:09 Naaz30

@llvm/issue-subscribers-mlir-llvm

Author: frida-albrecht

### Description

The compiler crashes when running -gpu-module-to-binary on an MLIR module containing an llvm.mlir.constant operation that references a non-existent dense_resource.

The parser reports that the resource does not exist, but the compilation continues into LLVM IR translation. During translation of the following llvm.icmp operation, a null llvm::Value is passed to LLVM's IRBuilder::CreateICmp, which triggers an assertion failure in llvm::dyn_cast.

Tested commit

3b8ee89

Test case

module attributes {gpu.container_module} {
  gpu.module @<!-- -->main_kernel [#nvvm.target] {
    llvm.func @<!-- -->main_kernel(%arg0: vector&lt;128xi32&gt;, %arg1: vector&lt;128xi32&gt;) attributes {gpu.kernel, nvvm.kernel} {
      %0 = llvm.mlir.constant(dense_resource&lt;__elided__&gt; : vector&lt;128xi32&gt;) : vector&lt;128xi32&gt;
      %1 = llvm.ashr %arg0, %arg1 : vector&lt;128xi32&gt;
      %2 = llvm.icmp "sgt" %1, %0 : vector&lt;128xi32&gt;
      llvm.return
    }
  }
}

Steps to reproduce

mlir-opt test.mlir  -gpu-module-to-binary

stack trace

test1.mlir:4:12: error: resource does not exist
      %0 = llvm.mlir.constant(dense_resource&lt;__elided__&gt; : vector&lt;128xi32&gt;) : vector&lt;128xi32&gt;
           ^
mlir-opt: /home/workdir/llvm-project-latest/llvm/include/llvm/Support/Casting.h:656: decltype(auto) llvm::dyn_cast(From *) [To = llvm::Constant, From = llvm::Value]: Assertion `detail::isPresent(Val) &amp;&amp; "dyn_cast on a non-existent value"' failed.                                                                
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0.      Program arguments: mlir-opt test.mlir -gpu-module-to-binary
 #<!-- -->0 0x0000556ec6953d0b llvm::sys::PrintStackTrace(llvm::raw_ostream&amp;, int) (../llvm-project-latest/build/bin/mlir-opt+0x1fc2d0b)
 #<!-- -->1 0x0000556ec6950b11 llvm::sys::RunSignalHandlers() (../llvm-project-latest/build/bin/mlir-opt+0x1fbfb11)
 #<!-- -->2 0x0000556ec6954a3b SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #<!-- -->3 0x00007f733c007520 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #<!-- -->4 0x00007f733c05b9fc pthread_kill (/usr/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #<!-- -->5 0x00007f733c007476 gsignal (/usr/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #<!-- -->6 0x00007f733bfed7f3 abort (/usr/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #<!-- -->7 0x00007f733bfed71b (/usr/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
 #<!-- -->8 0x00007f733bffee96 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
 #<!-- -->9 0x0000556ecbb00a52 llvm::TargetFolder::FoldGEP(llvm::Type*, llvm::Value*, llvm::ArrayRef&lt;llvm::Value*&gt;, llvm::GEPNoWrapFlags) const (../llvm-project-latest/build/bin/mlir-opt+0x716fa52)
#<!-- -->10 0x0000556ec7d3fb84 llvm::IRBuilderBase::CreateICmp(llvm::CmpInst::Predicate, llvm::Value*, llvm::Value*, llvm::Twine const&amp;) (../llvm-project-latest/build/bin/mlir-opt+0x33aeb84)
#<!-- -->11 0x0000556ec7d2e81d convertOperationImpl(mlir::Operation&amp;, llvm::IRBuilderBase&amp;, mlir::LLVM::ModuleTranslation&amp;) LLVMToLLVMIRTranslation.cpp:0:0
#<!-- -->12 0x0000556ecb3cbfd6 mlir::LLVM::ModuleTranslation::convertOperationImpl(mlir::Operation&amp;, llvm::IRBuilderBase&amp;, bool) (../llvm-project-latest/build/bin/mlir-opt+0x6a3afd6)
#<!-- -->13 0x0000556ecb3cc758 mlir::LLVM::ModuleTranslation::convertBlockImpl(mlir::Block&amp;, bool, llvm::IRBuilderBase&amp;, bool) (../llvm-project-latest/build/bin/mlir-opt+0x6a3b758)
#<!-- -->14 0x0000556ecb3d2ef4 mlir::LLVM::ModuleTranslation::convertOneFunction(mlir::LLVM::LLVMFuncOp) (../llvm-project-latest/build/bin/mlir-opt+0x6a41ef4)
#<!-- -->15 0x0000556ecb3d6913 mlir::LLVM::ModuleTranslation::convertFunctions() (../llvm-project-latest/build/bin/mlir-opt+0x6a45913)
#<!-- -->16 0x0000556ecb3da8d3 mlir::translateModuleToLLVMIR(mlir::Operation*, llvm::LLVMContext&amp;, llvm::StringRef, bool, llvm::vfs::FileSystem*) (../llvm-project-latest/build/bin/mlir-opt+0x6a498d3)
#<!-- -->17 0x0000556ec8e41488 mlir::LLVM::ModuleToObject::run() (../llvm-project-latest/build/bin/mlir-opt+0x44b0488)
#<!-- -->18 0x0000556ec876459e mlir::gpu::detail::TargetAttrInterfaceInterfaceTraits::FallbackModel&lt;(anonymous namespace)::NVVMTargetAttrImpl&gt;::serializeToObject(mlir::gpu::detail::TargetAttrInterfaceInterfaceTraits::Concept const*, mlir::Attribute, mlir::Operation*, mlir::gpu::TargetOptions const&amp;) Target.cpp:0:0
#<!-- -->19 0x0000556ecd8098bf mlir::gpu::TargetAttrInterface::serializeToObject(mlir::Operation*, mlir::gpu::TargetOptions const&amp;) const (../llvm-project-latest/build/bin/mlir-opt+0x8e788bf)
#<!-- -->20 0x0000556ec8531494 mlir::gpu::transformGpuModulesToBinaries(mlir::Operation*, mlir::gpu::OffloadingLLVMTranslationAttrInterface, mlir::gpu::TargetOptions const&amp;) (../llvm-project-latest/build/bin/mlir-opt+0x3ba0494)
#<!-- -->21 0x0000556ec8532547 (anonymous namespace)::GpuModuleToBinaryPass::runOnOperation() ModuleToBinary.cpp:0:0
#<!-- -->22 0x0000556eceb533ee mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (../llvm-project-latest/build/bin/mlir-opt+0xa1c23ee)
#<!-- -->23 0x0000556eceb54364 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&amp;, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (../llvm-project-latest/build/bin/mlir-opt+0xa1c3364)
#<!-- -->24 0x0000556eceb5b0fa mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) (../llvm-project-latest/build/bin/mlir-opt+0xa1ca0fa)
#<!-- -->25 0x0000556eceb5aa5d mlir::PassManager::run(mlir::Operation*) (../llvm-project-latest/build/bin/mlir-opt+0xa1c9a5d)
#<!-- -->26 0x0000556ec69ff58f performActions(llvm::raw_ostream&amp;, std::shared_ptr&lt;llvm::SourceMgr&gt; const&amp;, mlir::MLIRContext*, mlir::MlirOptMainConfig const&amp;) MlirOptMain.cpp:0:0
#<!-- -->27 0x0000556ec69fe761 llvm::LogicalResult llvm::function_ref&lt;llvm::LogicalResult (std::unique_ptr&lt;llvm::MemoryBuffer, std::default_delete&lt;llvm::MemoryBuffer&gt;&gt;, llvm::MemoryBufferRef const&amp;, llvm::raw_ostream&amp;)&gt;::callback_fn&lt;mlir::MlirOptMain(llvm::raw_ostream&amp;, std::unique_ptr&lt;llvm::MemoryBuffer, std::default_delete&lt;llvm::MemoryBuffer&gt;&gt;, mlir::DialectRegistry&amp;, mlir::MlirOptMainConfig const&amp;)::$_0&gt;(long, std::unique_ptr&lt;llvm::MemoryBuffer, std::default_delete&lt;llvm::MemoryBuffer&gt;&gt;, llvm::MemoryBufferRef const&amp;, llvm::raw_ostream&amp;) MlirOptMain.cpp:0:0
#<!-- -->28 0x0000556eceeadec6 mlir::splitAndProcessBuffer(std::unique_ptr&lt;llvm::MemoryBuffer, std::default_delete&lt;llvm::MemoryBuffer&gt;&gt;, llvm::function_ref&lt;llvm::LogicalResult (std::unique_ptr&lt;llvm::MemoryBuffer, std::default_delete&lt;llvm::MemoryBuffer&gt;&gt;, llvm::MemoryBufferRef const&amp;, llvm::raw_ostream&amp;)&gt;, llvm::raw_ostream&amp;, llvm::StringRef, llvm::StringRef) (../llvm-project-latest/build/bin/mlir-opt+0xa51cec6)
#<!-- -->29 0x0000556ec69f4ba6 mlir::MlirOptMain(llvm::raw_ostream&amp;, std::unique_ptr&lt;llvm::MemoryBuffer, std::default_delete&lt;llvm::MemoryBuffer&gt;&gt;, mlir::DialectRegistry&amp;, mlir::MlirOptMainConfig const&amp;) (../llvm-project-latest/build/bin/mlir-opt+0x2063ba6)
#<!-- -->30 0x0000556ec69f4f7a mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&amp;) (../llvm-project-latest/build/bin/mlir-opt+0x2063f7a)
#<!-- -->31 0x0000556ec69f51eb mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&amp;) (../llvm-project-latest/build/bin/mlir-opt+0x20641eb)
#<!-- -->32 0x0000556ec69397cd main (../llvm-project-latest/build/bin/mlir-opt+0x1fa87cd)
#<!-- -->33 0x00007f733bfeed90 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#<!-- -->34 0x00007f733bfeee40 __libc_start_main (/usr/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#<!-- -->35 0x0000556ec6939325 _start (../llvm-project-latest/build/bin/mlir-opt+0x1fa8325)
Aborted (core dumped)