This patch creates a much simpler and more straightforward loop in LowerFor for %affine.For. Previously, the loop was quite dependent on certain optimizations to happen. Otherwise, some funny things can end up in the backend.
Remark: We probably want to reduce this pass even further to just substitute %affine.For with an appropriate loop as I sketched in the comment. But rn, we can't quite do it, if the accumulator contains a mem.
This patch creates a much simpler and more straightforward loop in
LowerFor
for%affine.For
. Previously, the loop was quite dependent on certain optimizations to happen. Otherwise, some funny things can end up in the backend.Remark: We probably want to reduce this pass even further to just substitute
%affine.For
with an appropriate loop as I sketched in the comment. But rn, we can't quite do it, if the accumulator contains amem
.