Skip to content

[mlir] -convert-arm-sme-to-scf crashes #118611

Open
@Anonymous7i0em3yd

Description

@Anonymous7i0em3yd

git version: d097070

system: Ubuntu 18.04.6 LTS

reproduce with: mlir-opt -convert-arm-sme-to-scf a.mlir

a.mlir:

module {
  func.func @arm_sme_tile_store_hor_i128_i32(%arg0: vector<[1]x[1]xi128>, %arg1: memref<1x2x2xi128>) {
    %c0 = arith.constant 0 : index
    %c0_0 = arith.constant 0 : index
    arm_sme.tile_store %arg0, %arg1[%c0_0, %c0_0] layout<horizontal> : memref<1x2x2xi128>, vector<[1]x[1]xi128>
    return
  }
}

stack trace:

mlir-opt: /data/szy/MLIR/llvm-release/llvm-project/mlir/lib/Conversion/ArmSMEToSCF/ArmSMEToSCF.cpp:36: SmallVector<Value, 2> (anonymous namespace)::getMemrefIndices(ValueRange, unsigned int, Value, Value, Location, PatternRewriter &): Assertion `(rank == 1 || rank == 2) && "memref has unexpected rank!"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: /data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt -convert-arm-sme-to-scf /data/szy/MLIR/seed/seed1/tmp.5OHJ322bT6.mlir
 #0 0x000055d31395df88 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x1185f88)
 #1 0x000055d31395ba9e llvm::sys::RunSignalHandlers() (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x1183a9e)
 #2 0x000055d31395e91d SignalHandler(int) Signals.cpp:0:0
 #3 0x00007ff787ae6420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
 #4 0x00007ff78712300b raise /build/glibc-LcI20x/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
 #5 0x00007ff787102859 abort /build/glibc-LcI20x/glibc-2.31/stdlib/abort.c:81:7
 #6 0x00007ff787102729 get_sysdep_segment_value /build/glibc-LcI20x/glibc-2.31/intl/loadmsgcat.c:509:8
 #7 0x00007ff787102729 _nl_load_domain /build/glibc-LcI20x/glibc-2.31/intl/loadmsgcat.c:970:34
 #8 0x00007ff787113fd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
 #9 0x000055d31633d6a0 mlir::Value llvm::function_ref<mlir::Value (mlir::Value, mlir::ValueRange, mlir::Value, mlir::Value)>::callback_fn<(anonymous namespace)::TileLoadOpConversion::matchAndRewrite(mlir::arm_sme::TileLoadOp, mlir::PatternRewriter&) const::'lambda'(mlir::Value, mlir::ValueRange, mlir::Value, mlir::Value)>(long, mlir::Value, mlir::ValueRange, mlir::Value, mlir::Value) ArmSMEToSCF.cpp:0:0
#10 0x000055d31633cb4e (anonymous namespace)::createLoadStoreForOverTileSlices(mlir::PatternRewriter&, mlir::Location, mlir::VectorType, mlir::ValueRange, int, mlir::Value, mlir::Value, llvm::function_ref<mlir::Value (mlir::Value, mlir::ValueRange, mlir::Value, mlir::Value)>) ArmSMEToSCF.cpp:0:0
#11 0x000055d31633f932 (anonymous namespace)::TileStoreOpConversion::matchAndRewrite(mlir::arm_sme::TileStoreOp, mlir::PatternRewriter&) const ArmSMEToSCF.cpp:0:0
#12 0x000055d3198b7a21 void llvm::function_ref<void ()>::callback_fn<mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<llvm::LogicalResult (mlir::Pattern const&)>)::$_0>(long) PatternApplicator.cpp:0:0
#13 0x000055d3198b46eb mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<llvm::LogicalResult (mlir::Pattern const&)>) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x70dc6eb)
#14 0x000055d316df8a03 (anonymous namespace)::OperationLegalizer::legalize(mlir::Operation*, mlir::ConversionPatternRewriter&) DialectConversion.cpp:0:0
#15 0x000055d316df7a57 mlir::OperationConverter::convert(mlir::ConversionPatternRewriter&, mlir::Operation*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x461fa57)
#16 0x000055d316df8c2f mlir::OperationConverter::convertOperations(llvm::ArrayRef<mlir::Operation*>) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x4620c2f)
#17 0x000055d316dfedeb mlir::applyPartialConversion(mlir::Operation*, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, mlir::ConversionConfig) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x4626deb)
#18 0x000055d316340241 (anonymous namespace)::ConvertArmSMEToSCFPass::runOnOperation() ArmSMEToSCF.cpp:0:0
#19 0x000055d316d98936 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x45c0936)
#20 0x000055d316d99260 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x45c1260)
#21 0x000055d316d9b832 mlir::PassManager::run(mlir::Operation*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x45c3832)
#22 0x000055d316d940da performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#23 0x000055d316d93d2d llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, 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::raw_ostream&) MlirOptMain.cpp:0:0
#24 0x000055d316e3ffa5 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::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x4667fa5)
#25 0x000055d316d8dd15 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x45b5d15)
#26 0x000055d316d8dfbf mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x45b5fbf)
#27 0x000055d316d8e2ee mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x45b62ee)
#28 0x000055d31393ea77 main (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x1166a77)
#29 0x00007ff787104083 __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/../csu/libc-start.c:342:3
#30 0x000055d31393e5ee _start (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x11665ee)

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions