<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/58807>58807</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            arith-unsigned-when-equivalent Pass violated assertion and crashed.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Colloportus0
      </td>
    </tr>
</table>

<pre>
    MLIR built at commit https://github.com/llvm/llvm-project/commit/52516782972730ff065a34123a9d8876da08c254

Reproduced with: 
`mlir-opt --arith-unsigned-when-equivalent issue.mlir`

[issue.mlir.txt](https://github.com/llvm/llvm-project/files/9936438/issue.mlir.txt)

```console
Assertion failed: (!isUninitialized()), function getValue, file IntegerRangeAnalysis.h, line 42.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: mlir-opt --arith-unsigned-when-equivalent issue.mlir
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  mlir-opt                 0x00000001034d7a20 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 72
1  mlir-opt                 0x00000001034d7f3c PrintStackTraceSignalHandler(void*) + 28
2  mlir-opt                 0x00000001034d604c llvm::sys::RunSignalHandlers() + 148
3  mlir-opt                 0x00000001034d980c SignalHandler(int) + 252
4  libsystem_platform.dylib 0x00000001a33254c4 _sigtramp + 56
5  libsystem_pthread.dylib  0x00000001a330dee0 pthread_kill + 288
6  libsystem_c.dylib        0x00000001a3248340 abort + 168
7  libsystem_c.dylib        0x00000001a3247754 err + 0
8  mlir-opt                 0x0000000106ec5660 mlir::dataflow::IntegerValueRange::getValue() const + 68
9  mlir-opt                 0x00000001038caf30 staticallyNonNegative(mlir::DataFlowSolver&, mlir::Value) + 88
10 mlir-opt                 0x00000001038caeb8 staticallyNonNegative(mlir::DataFlowSolver&, mlir::Operation*)::$_0::operator()(mlir::Value) const + 44
11 mlir-opt                 0x00000001038cae38 bool std::__1::all_of<llvm::detail::indexed_accessor_range_base<mlir::OperandRange, mlir::OpOperand*, mlir::Value, mlir::Value, mlir::Value>::iterator, staticallyNonNegative(mlir::DataFlowSolver&, mlir::Operation*)::$_0>(llvm::detail::indexed_accessor_range_base<mlir::OperandRange, mlir::OpOperand*, mlir::Value, mlir::Value, mlir::Value>::iterator, llvm::detail::indexed_accessor_range_base<mlir::OperandRange, mlir::OpOperand*, mlir::Value, mlir::Value, mlir::Value>::iterator, staticallyNonNegative(mlir::DataFlowSolver&, mlir::Operation*)::$_0) + 80
12 mlir-opt                 0x00000001038cad74 bool llvm::all_of<mlir::OperandRange, staticallyNonNegative(mlir::DataFlowSolver&, mlir::Operation*)::$_0>(mlir::OperandRange&&, staticallyNonNegative(mlir::DataFlowSolver&, mlir::Operation*)::$_0) + 84
13 mlir-opt                 0x00000001038cacc0 staticallyNonNegative(mlir::DataFlowSolver&, mlir::Operation*) + 68
14 mlir-opt                 0x00000001038cac48 (anonymous namespace)::ArithUnsignedWhenEquivalentPass::runOnOperation()::'lambda'(mlir::Operation*)::operator()(mlir::Operation*) const + 36
15 mlir-opt                 0x00000001038cabfc decltype(static_cast<(anonymous namespace)::ArithUnsignedWhenEquivalentPass::runOnOperation()::'lambda'(mlir::Operation*)&>(fp)(static_cast<mlir::Operation*>(fp0))) std::__1::__invoke<(anonymous namespace)::ArithUnsignedWhenEquivalentPass::runOnOperation()::'lambda'(mlir::Operation*)&, mlir::Operation*>((anonymous namespace)::ArithUnsignedWhenEquivalentPass::runOnOperation()::'lambda'(mlir::Operation*)&, mlir::Operation*&&) + 36
16 mlir-opt                 0x00000001038caba0 llvm::Optional<bool> std::__1::__invoke_void_return_wrapper<llvm::Optional<bool>, false>::__call<(anonymous namespace)::ArithUnsignedWhenEquivalentPass::runOnOperation()::'lambda'(mlir::Operation*)&, mlir::Operation*>((anonymous namespace)::ArithUnsignedWhenEquivalentPass::runOnOperation()::'lambda'(mlir::Operation*)&, mlir::Operation*&&) + 52
17 mlir-opt                 0x00000001038cab44 std::__1::__function::__alloc_func<(anonymous namespace)::ArithUnsignedWhenEquivalentPass::runOnOperation()::'lambda'(mlir::Operation*), std::__1::allocator<(anonymous namespace)::ArithUnsignedWhenEquivalentPass::runOnOperation()::'lambda'(mlir::Operation*)>, llvm::Optional<bool> (mlir::Operation*)>::operator()(mlir::Operation*&&) + 52
18 mlir-opt                 0x00000001038c96a4 std::__1::__function::__func<(anonymous namespace)::ArithUnsignedWhenEquivalentPass::runOnOperation()::'lambda'(mlir::Operation*), std::__1::allocator<(anonymous namespace)::ArithUnsignedWhenEquivalentPass::runOnOperation()::'lambda'(mlir::Operation*)>, llvm::Optional<bool> (mlir::Operation*)>::operator()(mlir::Operation*&&) + 52
19 mlir-opt                 0x000000010713e79c std::__1::__function::__value_func<llvm::Optional<bool> (mlir::Operation*)>::operator()(mlir::Operation*&&) const + 84
20 mlir-opt                 0x00000001070fda04 std::__1::function<llvm::Optional<bool> (mlir::Operation*)>::operator()(mlir::Operation*) const + 48
21 mlir-opt                 0x00000001070fd6f8 mlir::ConversionTarget::isLegal(mlir::Operation*) const::$_12::operator()() const + 80
22 mlir-opt                 0x00000001070fd530 mlir::ConversionTarget::isLegal(mlir::Operation*) const + 160
23 mlir-opt                 0x00000001070f9708 computeConversionSet(llvm::iterator_range<llvm::ilist_iterator<llvm::ilist_detail::node_options<mlir::Block, true, false, void>, false, false>>, mlir::Location, llvm::SmallVectorImpl<mlir::Operation*>&, mlir::ConversionTarget*) + 320
24 mlir-opt                 0x00000001070f97d0 computeConversionSet(llvm::iterator_range<llvm::ilist_iterator<llvm::ilist_detail::node_options<mlir::Block, true, false, void>, false, false>>, mlir::Location, llvm::SmallVectorImpl<mlir::Operation*>&, mlir::ConversionTarget*) + 520
25 mlir-opt                 0x00000001070fee34 (anonymous namespace)::OperationConverter::convertOperations(llvm::ArrayRef<mlir::Operation*>, llvm::function_ref<void (mlir::Diagnostic&)>) + 336
26 mlir-opt                 0x00000001070fec4c mlir::applyPartialConversion(llvm::ArrayRef<mlir::Operation*>, mlir::ConversionTarget&, mlir::FrozenRewritePatternSet const&, llvm::DenseSet<mlir::Operation*, llvm::DenseMapInfo<mlir::Operation*, void>>*) + 124
27 mlir-opt                 0x00000001070ff140 mlir::applyPartialConversion(mlir::Operation*, mlir::ConversionTarget&, mlir::FrozenRewritePatternSet const&, llvm::DenseSet<mlir::Operation*, llvm::DenseMapInfo<mlir::Operation*, void>>*) + 72
28 mlir-opt                 0x00000001038c5ab8 (anonymous namespace)::ArithUnsignedWhenEquivalentPass::runOnOperation() + 376
29 mlir-opt                 0x0000000106fc3184 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) + 512
30 mlir-opt                 0x0000000106fc3854 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) + 364
31 mlir-opt                 0x0000000106fc5a98 mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) + 108
32 mlir-opt                 0x0000000106fc5870 mlir::PassManager::run(mlir::Operation*) + 864
33 mlir-opt                 0x0000000106faac84 performActions(llvm::raw_ostream&, bool, bool, llvm::SourceMgr&, mlir::MLIRContext*, llvm::function_ref<mlir::LogicalResult (mlir::PassManager&)>, bool, bool) + 560
34 mlir-opt                 0x0000000106faa818 processBuffer(llvm::raw_ostream&, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, bool, bool, bool, bool, bool, bool, llvm::function_ref<mlir::LogicalResult (mlir::PassManager&)>, mlir::DialectRegistry&, llvm::ThreadPool*) + 496
35 mlir-opt                 0x0000000106faa5e0 mlir::MlirOptMain(llvm::raw_ostream&, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (mlir::PassManager&)>, mlir::DialectRegistry&, bool, bool, bool, bool, bool, bool, bool)::$_0::operator()(std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) const + 204
36 mlir-opt                 0x0000000106faa4f4 mlir::LogicalResult llvm::function_ref<mlir::LogicalResult (std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (mlir::PassManager&)>, mlir::DialectRegistry&, bool, bool, bool, bool, bool, bool, bool)::$_0>(long, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) + 80
37 mlir-opt                 0x00000001071a71e8 llvm::function_ref<mlir::LogicalResult (std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::operator()(std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) const + 96
38 mlir-opt                 0x00000001071a6ccc mlir::splitAndProcessBuffer(std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool) + 128
39 mlir-opt                 0x0000000106fa7f4c mlir::MlirOptMain(llvm::raw_ostream&, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (mlir::PassManager&)>, mlir::DialectRegistry&, bool, bool, bool, bool, bool, bool, bool) + 320
40 mlir-opt                 0x0000000106fa8154 mlir::MlirOptMain(llvm::raw_ostream&, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, mlir::PassPipelineCLParser const&, mlir::DialectRegistry&, bool, bool, bool, bool, bool, bool, bool, bool) + 296
41 mlir-opt                 0x0000000106fa8d00 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&, bool) + 2888
42 mlir-opt                 0x0000000102d17e58 main + 148
43 dyld                     0x000000011ffed088 start + 516
zsh: abort      mlir-opt --arith-unsigned-when-equivalent issue.mlir
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJztW1tzo7gS_jXOiyou7uAHPziXqU1Vskkls3PqnBdKBmGzgyVWEsl4fv1pCbABX6JkJ7vJ1LhSMUao1f31Rd2SmLN0Pb25vrpH8yovJMISJWy1yiVaSlmKkTsbOZ_gb5HLZTUfQxv8KIrH9uu05OxPkkj4WfeDC9_x7SCMnEnohK6VZVbgY9ezHRdP0igKgxRbUeL43si6GFmz-v89AUJplZAUPcFQMC5qmgNrVeT8lJUSnZ5iDo2nFRX5gpL09GlJ6Cn5q8ofcUGoRLkQFRmr56Fbl_zIP9u2jeU3OfIvRk70YhmzvCACvicTN_DcCK4GZJ1Jb1jgQv8ljApWkPruTAjCZc4oyjDQS7WwDhCzc_EHzWkuc1zk36FB3Zzov3OUVTTRnRZEfsFFRfRN6I-uqCQLwu8xXZAZxcVa5GK8VM1FTgnynHE97t315ezhEolqrvSLQeMLxEnJuESSvVzfWnIFBsI0RTlNiiolSC4JSjgWSzTHyVfJcUKa4R8k3EBptSrVKPqWNUb6c8fZguMVwnxRrUCRig_0KrUPRtLGxCqJxHo1ZwWieEWEAptQUXGC1qxCS_xIkJatfgiQ5yCOauPobvb5N8Q4EkRq0Qh9zDmjikn0iDkC3V5ff7mJH_57c3Z7ffW_y_tYdYHbCtOS5VSDm2vL2IiNt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