Issue 146990
Summary [MLIR][SCF] pipelining pass use of uninitialized value
Labels mlir
Assignees
Reporter Hyffer
    Here in the code:

https://github.com/llvm/llvm-project/blob/61529d9e36fa86782a2458e6bdeedf7f376ef4b5/mlir/lib/Dialect/SCF/Transforms/LoopPipelining.cpp#L127

https://github.com/llvm/llvm-project/blob/61529d9e36fa86782a2458e6bdeedf7f376ef4b5/mlir/lib/Dialect/SCF/Transforms/LoopPipelining.cpp#L148-L153

`maxStage` is used before initialized.

When it checks `numIteration > maxStage` at line-127, maxStage is always 0 as default. So it will mistakenly decide if the loop trip count is actually greater than stage number, and thus pipelining a loop that should not have done.

---
At older llvm version(17), it was correct. The problem is introduced in this commit: https://github.com/llvm/llvm-project/commit/ef112833e11e94ea049f98bec4a29b4fe96a25dd
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to