As discussed in [1], it is possible that the input to the Linalg
vectorizer contains affine.apply ops. Such operations are not
vectarizable at the moment, but this can be fixed by simply converting
them to arithmetic operations. This is basically what this patch
introduces.
The IR change enabled in this patch could be part of a larger set of
"linalgOp pre-processing" transformations that happens right before
vectorization starts but after we know we can vectorize the op. I am
leaving this as a TODO.
[1] https://github.com/iree-org/iree/issues/10876
Co-authored-by: Thomas Raoux <thomasraoux@google.com>
Perhaps it would make sense to create simpler test so that it's simpler to understand the generated output (talking about myself here :))