<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - llvm::EVT::getHalfNumVectorElementsVT assert when running MLIR"
   href="https://bugs.llvm.org/show_bug.cgi?id=45563">45563</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>llvm::EVT::getHalfNumVectorElementsVT assert when running MLIR
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ajcbik@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=23367" name="attach_23367" title="mlir reproducer file">attachment 23367</a> <a href="attachment.cgi?id=23367&action=edit" title="mlir reproducer file">[details]</a></span>
mlir reproducer file

To reproduce
(1) build the MLIR binaries mlir-opt/mlir-cpu-runner
(2) (optional) build support lib ibmlir_runner_utils.so, for vector.print
(2) run this on command line

mlir-opt \
     -convert-loop-to-std  \
    --convert-vector-to-llvm \
    --convert-std-to-llvm test-transfer-read.mlir |  \
mlir-cpu-runner \
   -e entry -entry-point-result=void \
   -shared-libs=<path-to>/libmlir_runner_utils.so

Crashes as follows:


F0415 15:12:21.702099   34881 logging.cc:106] assert.h assertion failed at
third_party/llvm/llvm-project/llvm/include/llvm/CodeGen/ValueTypes.h:371 in
llvm::EVT llvm::EVT::getHalfNumVectorElementsVT(llvm::LLVMContext &) const:
!(EltCnt.Min & 1) && "Splitting vector, but not in half!"
*** Check failure stack trace: ***
    @     0x5578e24d0e30  absl::logging_internal::LogMessage::DieIfFatal()
    @     0x5578e24d0703  absl::logging_internal::LogMessage::SendToLog()
    @     0x5578e24cf9ce  absl::logging_internal::LogMessage::Flush()
    @     0x5578e24d1c88 
absl::logging_internal::LogMessageFatal::~LogMessageFatal()
    @     0x5578e24cd930  __assert_fail
    @     0x5578e0704c27  llvm::EVT::getHalfNumVectorElementsVT()
    @     0x5578e06fa5cb  llvm::SelectionDAG::GetSplitDestVTs()
    @     0x5578e07f066d  llvm::DAGTypeLegalizer::SplitVecRes_MLOAD()
    @     0x5578e07ebad7  llvm::DAGTypeLegalizer::SplitVectorResult()
    @     0x5578e07bad7d  llvm::DAGTypeLegalizer::run()
    @     0x5578e07bf5ab  llvm::SelectionDAG::LegalizeTypes()
    @     0x5578e079d2af  llvm::SelectionDAGISel::CodeGenAndEmitDAG()
    @     0x5578e079cbef  llvm::SelectionDAGISel::SelectBasicBlock()
    @     0x5578e079c645  llvm::SelectionDAGISel::SelectAllBasicBlocks()
    @     0x5578e0799845  llvm::SelectionDAGISel::runOnMachineFunction()
    @     0x5578dfa9ec32  (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction()
    @     0x5578e0495927  llvm::MachineFunctionPass::runOnFunction()
    @     0x5578e201982c  llvm::FPPassManager::runOnFunction()
    @     0x5578e2019c55  llvm::FPPassManager::runOnModule()
    @     0x5578e201a3b4  (anonymous namespace)::MPPassManager::runOnModule()
    @     0x5578e2019ef8  llvm::legacy::PassManagerImpl::run()
    @     0x5578e201a961  llvm::legacy::PassManager::run()
    @     0x5578dff4c210  llvm::orc::SimpleCompiler::operator()()
    @     0x5578dffab7b6  llvm::orc::ThreadSafeModule::withModuleDo<>()
    @     0x5578dffab339  llvm::orc::IRCompileLayer::emit()
    @     0x5578dffd535c  llvm::orc::IRTransformLayer::emit()
    @     0x5578dffd535c  llvm::orc::IRTransformLayer::emit()
    @     0x5578e000fd16 
llvm::orc::BasicIRLayerMaterializationUnit::materialize()
    @     0x5578dff7d907  llvm::orc::MaterializationUnit::doMaterialize()
    @     0x5578dff68330 
llvm::orc::ExecutionSession::materializeOnCurrentThread()
    @     0x5578dff82324  std::__u::__invoke<>()
    @     0x5578dff822c7  std::__u::__invoke_void_return_wrapper<>::__call<>()</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>