Fix fold of 0-result 0-trip-count `affine.for`
Folding 0-result ops is tricky. An 0-trip-count `affine.for` that does not return any results is not erased at the end of its usual fold method. Attempting fold it to only results in an infinite loop of folds on the same op. Fix this by attempting for fold away only those `affine.for` ops that return a non-zero number of results. Reviewed By: bondhugula Differential Revision: https://reviews.llvm.org/D151546
Loading
Please sign in to comment