Issue |
120882
|
Summary |
[mlir] -arith-unsigned-when-equivalent crashes
|
Labels |
mlir
|
Assignees |
|
Reporter |
wwy6191
|
git version: bc29fc937c6cb4a210f80c93c79fc6ed97c801f8
system: `Ubuntu 18.04.6 LTS`
reproduce with: `mlir-opt -arith-unsigned-when-equivalent a.mlir`
a.mlir:
```
func.func @test_shl_i8_nowrap() -> i8 {
%cst3 = arith.constant 3 : i8
%0 = test.with_bounds { umin = 10 : i64, umax = 15 : ui64, smin = 10 : si64, smax = 15 : si64 } : i8
%1 = arith.shli %0, %cst3 overflow<nsw> : i8
%2 = test.reflect_bounds %1 : i8
return %2: i8
}
```
stack trace:
```
<unknown>:0: error: integer type bit width (8) doesn't match value bit width (64)
mlir-opt: /data/szy/MLIR/llvm-release/llvm-project/mlir/include/mlir/IR/StorageUniquerSupport.h:180: static ConcreteT mlir::detail::StorageUserBase<mlir::IntegerAttr, mlir::Attribute, mlir::detail::IntegerAttrStorage, mlir::detail::AttributeUniquer, mlir::TypedAttr::Trait>::get(MLIRContext *, Args &&...) [ConcreteT = mlir::IntegerAttr, BaseT = mlir::Attribute, StorageT = mlir::detail::IntegerAttrStorage, UniquerT = mlir::detail::AttributeUniquer, Traits = <mlir::TypedAttr::Trait>, Args = <mlir::Type &, const llvm::APInt &>]: Assertion `succeeded( ConcreteT::verifyInvariants(getDefaultDiagnosticEmitFn(ctx), args...))' 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 -arith-unsigned-when-equivalent /data/szy/MLIR/seed726/tmp.M9zUoiOZMu.mlir
#0 0x000055a9d52aa418 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x11ee418)
#1 0x000055a9d52a7f2e llvm::sys::RunSignalHandlers() (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x11ebf2e)
#2 0x000055a9d52aadad SignalHandler(int) Signals.cpp:0:0
#3 0x00007f919dfba420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
#4 0x00007f919d5f700b raise /build/glibc-LcI20x/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
#5 0x00007f919d5d6859 abort /build/glibc-LcI20x/glibc-2.31/stdlib/abort.c:81:7
#6 0x00007f919d5d6729 get_sysdep_segment_value /build/glibc-LcI20x/glibc-2.31/intl/loadmsgcat.c:509:8
#7 0x00007f919d5d6729 _nl_load_domain /build/glibc-LcI20x/glibc-2.31/intl/loadmsgcat.c:970:34
#8 0x00007f919d5e7fd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
#9 0x000055a9d82f37b1 (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x42377b1)
#10 0x000055a9d82f362f mlir::IntegerAttr::get(mlir::Type, llvm::APInt const&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x423762f)
#11 0x000055a9d8438c02 test::TestReflectBoundsOp::inferResultRanges(llvm::ArrayRef<mlir::ConstantIntRanges>, llvm::function_ref<void (mlir::Value, mlir::ConstantIntRanges const&)>) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x437cc02)
#12 0x000055a9d87d9291 mlir::detail::InferIntRangeInterfaceInterfaceTraits::Model<test::TestReflectBoundsOp>::inferResultRanges(mlir::detail::InferIntRangeInterfaceInterfaceTraits::Concept const*, mlir::Operation*, llvm::ArrayRef<mlir::ConstantIntRanges>, llvm::function_ref<void (mlir::Value, mlir::ConstantIntRanges const&)>) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x471d291)
#13 0x000055a9db3e4066 mlir::intrange::detail::defaultInferResultRanges(mlir::InferIntRangeInterface, llvm::ArrayRef<mlir::IntegerValueRange>, llvm::function_ref<void (mlir::Value, mlir::IntegerValueRange const&)>) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x7328066)
#14 0x000055a9d81f4bdc mlir::dataflow::IntegerRangeAnalysis::visitOperation(mlir::Operation*, llvm::ArrayRef<mlir::dataflow::IntegerValueRangeLattice const*>, llvm::ArrayRef<mlir::dataflow::IntegerValueRangeLattice*>) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x4138bdc)
#15 0x000055a9d81f7c99 mlir::dataflow::AbstractSparseForwardDataFlowAnalysis::visitOperation(mlir::Operation*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x413bc99)
#16 0x000055a9d81f7339 mlir::dataflow::AbstractSparseForwardDataFlowAnalysis::initializeRecursively(mlir::Operation*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x413b339)
#17 0x000055a9d81f75ed mlir::dataflow::AbstractSparseForwardDataFlowAnalysis::initializeRecursively(mlir::Operation*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x413b5ed)
#18 0x000055a9d81f75ed mlir::dataflow::AbstractSparseForwardDataFlowAnalysis::initializeRecursively(mlir::Operation*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x413b5ed)
#19 0x000055a9d81d59ee mlir::DataFlowSolver::initializeAndRun(mlir::Operation*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x41199ee)
#20 0x000055a9d55e1854 (anonymous namespace)::ArithUnsignedWhenEquivalentPass::runOnOperation() UnsignedWhenEquivalent.cpp:0:0
#21 0x000055a9d820ad66 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x414ed66)
#22 0x000055a9d820b690 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+0x414f690)
#23 0x000055a9d820dc62 mlir::PassManager::run(mlir::Operation*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x4151c62)
#24 0x000055a9d82063da performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#25 0x000055a9d820602d 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
#26 0x000055a9d82b1985 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+0x41f5985)
#27 0x000055a9d8200015 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+0x4144015)
#28 0x000055a9d82002bf mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x41442bf)
#29 0x000055a9d82005ee mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x41445ee)
#30 0x000055a9d528af07 main (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x11cef07)
#31 0x00007f919d5d8083 __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/../csu/libc-start.c:342:3
#32 0x000055a9d528aa7e _start (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x11cea7e)
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs