[Clang][OpenMPIRBuilder] Fix off-by-one error when dividing by stepsize.
When the stepsize does not evenly divide the range's end, round-up to ensure that that last multiple of the stepsize before the reaching the upper boud is reached. For instance, the trip count of for (int i = 0; i < 7; i+=5) is two (i=0 and i=5), not (7-0)/5 == 1. Reviewed By: peixin Differential Revision: https://reviews.llvm.org/D118542
Loading
Please sign in to comment