We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
scf.for
1 parent 79a5974 commit fa2e9caCopy full SHA for fa2e9ca
mlir/lib/Dialect/SCF/Transforms/LoopPipelining.cpp
@@ -119,6 +119,10 @@ bool LoopPipelinerInternal::initializeLoopInfo(
119
int64_t ubImm = upperBoundCst.value();
120
int64_t lbImm = lowerBoundCst.value();
121
int64_t stepImm = stepCst.value();
122
+ if (stepImm <= 0) {
123
+ LDBG("--invalid loop step -> BAIL");
124
+ return false;
125
+ }
126
int64_t numIteration = llvm::divideCeilSigned(ubImm - lbImm, stepImm);
127
if (numIteration > maxStage) {
128
dynamicLoop = false;
0 commit comments