[all-commits] [llvm/llvm-project] 28c672: Fix fold of 0-result 0-trip-count `affine.for`
Vinayaka Bandishti via All-commits
all-commits at lists.llvm.org
Sun May 28 13:24:52 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 28c672cf83e81757023cd5ae1e044fcfcfacfc0f
https://github.com/llvm/llvm-project/commit/28c672cf83e81757023cd5ae1e044fcfcfacfc0f
Author: Vinayaka Bandishti <vinayaka at polymagelabs.com>
Date: 2023-05-29 (Mon, 29 May 2023)
Changed paths:
M mlir/lib/Dialect/Affine/IR/AffineOps.cpp
M mlir/test/Dialect/Affine/canonicalize.mlir
Log Message:
-----------
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
More information about the All-commits
mailing list