[mlir] fix off-by-one error in collapseParallelLoops
authorTobias Gysi <tobias.gysi@inf.ethz.ch>
Fri, 26 Jun 2020 11:46:37 +0000 (13:46 +0200)
committerTobias Gysi <tobias.gysi@inf.ethz.ch>
Fri, 26 Jun 2020 13:39:46 +0000 (15:39 +0200)
commit652a79659a89b3634f34c6cf94a0b18b25ea4419
tree83ee95fbb78839a7e41c62ff41c4bd449cee23a1
parent8304ab5799b4172462877ca7495115c659ec0be0
[mlir] fix off-by-one error in collapseParallelLoops

Summary: The patch fixes an off by one error in the method collapseParallelLoops. It ensures the same normalized bound is used for the computation of the division and the remainder.

Reviewers: herhut

Reviewed By: herhut

Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, stephenneuendorffer, Joonsoo, grosul1, Kayjukh, jurahul, msifontes

Tags: #mlir

Differential Revision: https://reviews.llvm.org/D82634
mlir/lib/Transforms/Utils/LoopUtils.cpp
mlir/test/Transforms/parallel-loop-collapsing.mlir
mlir/test/Transforms/single-parallel-loop-collapsing.mlir