Skip to content
Commit f22a573b authored by Jakub Kuderski's avatar Jakub Kuderski
Browse files

[mlir][vector] Clean up use of `llvm::zip` in `VectorOps.cpp`

- Use `zip_equal` where iteratees are supposted to have equal lenght.
- Use `zip_first` where the first iteratee is supposed to be the
  shortest.
- Use `llvm::enumerate` instead of calculating index manually.
- Use structured bindings to unpack tuples where appropriate.
- Fix a bug in a comparison in `intersectsWhereNonNegative`.

Both `zip_first` (after D138858) and `zip_equal` (introduced in D138865)
assert interatee lengths, which allows us to more precisely convey
whether we want to iterate over the common prefix (`zip`), or expect all
lengths to be the same (`zip_equal`).

Reviewed By: dcaballe, antiagainst

Differential Revision: https://reviews.llvm.org/D139022
parent b6a73d06
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment