alexey-bataev wrote: > I think we can fix `ShuffleCostEstimator::finalize` in another PR. I think this incorrect approach at all. You need to operate with the original length masks everywhere https://github.com/llvm/llvm-project/pull/120398