[Mlir-commits] [mlir] [mlir] Remove redundant check in LoopAnalysis (PR #75950)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Dec 19 08:54:20 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-affine
Author: Hsiangkai Wang (Hsiangkai)
<details>
<summary>Changes</summary>
We do not support vectorization across conditionals. We already check it in the beginning of isVectorizableLoopBodyWithOpCond(). There should be no need to check AffineIfOp when checking regions in a loop.
---
Full diff: https://github.com/llvm/llvm-project/pull/75950.diff
1 Files Affected:
- (modified) mlir/lib/Dialect/Affine/Analysis/LoopAnalysis.cpp (+1-1)
``````````diff
diff --git a/mlir/lib/Dialect/Affine/Analysis/LoopAnalysis.cpp b/mlir/lib/Dialect/Affine/Analysis/LoopAnalysis.cpp
index e645afe7cd3e8f..7a95bf5d4cb52d 100644
--- a/mlir/lib/Dialect/Affine/Analysis/LoopAnalysis.cpp
+++ b/mlir/lib/Dialect/Affine/Analysis/LoopAnalysis.cpp
@@ -302,7 +302,7 @@ isVectorizableLoopBodyWithOpCond(AffineForOp loop,
// No vectorization across unknown regions.
auto regions = matcher::Op([](Operation &op) -> bool {
- return op.getNumRegions() != 0 && !isa<AffineIfOp, AffineForOp>(op);
+ return op.getNumRegions() != 0 && !isa<AffineForOp>(op);
});
SmallVector<NestedMatch, 8> regionsMatched;
regions.match(forOp, ®ionsMatched);
``````````
</details>
https://github.com/llvm/llvm-project/pull/75950
More information about the Mlir-commits
mailing list