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

    <tr>
        <th>Summary</th>
        <td>
            [mlir] `test-vector-unrolling-patterns` pass crashed with assertion error "Iteratees do not have equal length"
        </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  585cbe3f
Reproduced with:  
`mlir-opt -test-vector-unrolling-patterns=unroll-based-on-type temp.mlir`

temp.mlir:
``` milr 
module {
  func.func @func1(%arg0: tensor<23x12xf16>, %arg1: tensor<?x?x12xi16>, %arg2: vector<23x21x23xi1>) -> i1 {
    %cst = arith.constant 2.05639219E+9 : f32
    %true = arith.constant true
    %c0 = arith.constant 0 : index
    %c5 = arith.constant 5 : index
    %c6 = arith.constant 6 : index
    %111 = vector.broadcast %cst : f32 to vector<21x12x12xf32>
 %112 = vector.fma %111, %111, %111 : vector<21x12x12xf32>
 vector.print %112 : vector<21x12x12xf32>
    return %true : i1
 }
}

```
 
trace:
```console
Assertion failed: (all_equal({range_size(t), range_size(u), range_size(args)...}) && "Iteratees do not have equal length"), function zip_equal, file STLExtras.h, line 876.
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 -test-vector-unrolling-patterns=unroll-based-on-type temp.mlir
 #0 0x0000000102e18f18 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/workspace/build/bin/mlir-opt+0x1002f8f18)
 #1 0x0000000102e171b4 llvm::sys::RunSignalHandlers() (/workspace/build/bin/mlir-opt+0x1002f71b4)
 #2 0x0000000102e195c4 SignalHandler(int) (/workspace/build/bin/mlir-opt+0x1002f95c4)
 #3 0x00000001be7894c4 (/usr/lib/system/libsystem_platform.dylib+0x1803414c4)
 #4 0x00000001be771ee0 (/usr/lib/system/libsystem_pthread.dylib+0x180329ee0)
 #5 0x00000001be6ac340 (/usr/lib/system/libsystem_c.dylib+0x180264340)
 #6 0x00000001be6ab754 (/usr/lib/system/libsystem_c.dylib+0x180263754)
 #7 0x00000001078f1840 mlir::computeSum(llvm::ArrayRef<long long>) (.cold.1) (/workspace/build/bin/mlir-opt+0x104dd1840)
 #8 0x0000000106a6967c llvm::SmallVector<long long, CalculateSmallVectorDefaultInlinedElements<long long>::value> computeElementwiseMulImpl<long long>(llvm::ArrayRef<long long>, llvm::ArrayRef<long long>) (/workspace/build/bin/mlir-opt+0x103f4967c)
 #9 0x0000000104bce50c (anonymous namespace)::UnrollElementwisePattern::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&) const (/workspace/build/bin/mlir-opt+0x1020ae50c)
#10 0x0000000106a9b0f0 mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<mlir::LogicalResult (mlir::Pattern const&)>)::$_2::operator()() const (/workspace/build/bin/mlir-opt+0x103f7b0f0)
#11 0x0000000106a983ec mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<mlir::LogicalResult (mlir::Pattern const&)>) (/workspace/build/bin/mlir-opt+0x103f783ec)
#12 0x00000001054c7420 (anonymous namespace)::GreedyPatternRewriteDriver::processWorklist() (/workspace/build/bin/mlir-opt+0x1029a7420)
#13 0x00000001054c4c50 mlir::applyPatternsAndFoldGreedily(mlir::Region&, mlir::FrozenRewritePatternSet const&, mlir::GreedyRewriteConfig, bool*) (/workspace/build/bin/mlir-opt+0x1029a4c50)
#14 0x0000000105420640 (anonymous namespace)::TestVectorUnrollingPatterns::runOnOperation() (/workspace/build/bin/mlir-opt+0x102900640)
#15 0x00000001054682a8 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/workspace/build/bin/mlir-opt+0x1029482a8)
#16 0x0000000105468998 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/workspace/build/bin/mlir-opt+0x102948998)
#17 0x0000000105469a4c mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool) (/workspace/build/bin/mlir-opt+0x102949a4c)
#18 0x0000000105468404 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/workspace/build/bin/mlir-opt+0x102948404)
#19 0x0000000105468998 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/workspace/build/bin/mlir-opt+0x102948998)
#20 0x000000010546a82c mlir::PassManager::run(mlir::Operation*) (/workspace/build/bin/mlir-opt+0x10294a82c)
#21 0x0000000105462d14 performActions(llvm::raw_ostream&, std::__1::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) (/workspace/build/bin/mlir-opt+0x102942d14)
#22 0x0000000105462368 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>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::$_1>(long, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) (/workspace/build/bin/mlir-opt+0x102942368)
#23 0x00000001054e034c 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) (/workspace/build/bin/mlir-opt+0x1029c034c)
#24 0x000000010545cd1c mlir::MlirOptMain(llvm::raw_ostream&, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/workspace/build/bin/mlir-opt+0x10293cd1c)
#25 0x000000010545d18c mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/workspace/build/bin/mlir-opt+0x10293d18c)
#26 0x0000000102b23510 main (/workspace/build/bin/mlir-opt+0x100003510)
#27 0x000000010e201088 

``` 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsWk1v4zjS_jXMhYhBUR-WDjk4Tvy-ATroIOnZPQY0VbK5TZEakkri-fULSnIsyulJ4u1dDBozmLYVqVj11FPFYlE0s1ZsFMAFSi9RenXGWrfV5mKppdSNNq615Gyty93F7Zebe7xuhXSYOcx1XQuHcZqnfA1xhcgVIot7aIwuWw4lfhZui-IFxv0TlJFaCnOuG4fPHVh3_gTcaXPeKqOlFGpz3jDnwCiL4qv-5vmaWSjPtTp3uwawg7qZeSUoI4PS7vNwP168Guv_x7WQZkBQ67KVgNH8sv8b46pVfOY_MEqI_44QzRFNmdkQD92BstqgeEnjl4i-VFGG4mtEl7iXiQIZFK9e_L-IvoiJIPWCvbu9Mhq90PhFRJ1Ugc9RfI1FNIaG_VBuHUbxFWZGuO2Ma2UdUw7TGUmzuKBRcY3oZYG99iqmwVBnWnhrrL8f2iBviZFOqVAlvITS6VvS6Y-ks7eksx9IR1HUifdEz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