[llvm-bugs] [Bug 45833] New: llvm::DAGTypeLegalizer::SplitVecOp_MSTORE crash

via llvm-bugs llvm-bugs at lists.llvm.org
Thu May 7 12:52:15 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=45833

            Bug ID: 45833
           Summary: llvm::DAGTypeLegalizer::SplitVecOp_MSTORE crash
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: ajcbik at google.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

This bug is actually a continuation of the earlier bug

https://bugs.llvm.org/show_bug.cgi?id=45563

that exposed a problem with loads on unusual vector lengths.
As I suspected, a similar issue arises for stores.

Take the following MLIR input

func @transfer_write13_1d(%A : memref<?xf32>, %base: index) {
  %f = constant 13.0 : f32
  %v = splat %f : vector<13xf32>
  vector.transfer_write %v, %A[%base]
    {permutation_map = affine_map<(d0) -> (d0)>}
    : vector<13xf32>, memref<?xf32>
  return
}

and run it through the lowering to LLVM-IR path for execution, and it crashes
LLVM as follows

F0507 12:50:26.508680   34021 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: ***
    @     0x557cd9079f40  absl::logging_internal::LogMessage::DieIfFatal()
    @     0x557cd9079813  absl::logging_internal::LogMessage::SendToLog()
    @     0x557cd9078ade  absl::logging_internal::LogMessage::Flush()
    @     0x557cd907ad98 
absl::logging_internal::LogMessageFatal::~LogMessageFatal()
    @     0x557cd9076a40  __assert_fail
    @     0x557cd72a6807  llvm::EVT::getHalfNumVectorElementsVT()
    @     0x557cd729c1cb  llvm::SelectionDAG::GetSplitDestVTs()
    @     0x557cd739c534  llvm::DAGTypeLegalizer::SplitVecOp_MSTORE()
    @     0x557cd7398366  llvm::DAGTypeLegalizer::SplitVectorOperand()
    @     0x557cd735cb0d  llvm::DAGTypeLegalizer::run()

The fix is probably very similar.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200507/1f9e4903/attachment.html>


More information about the llvm-bugs mailing list