Skip to content
Commit 8a9e4f24 authored by Michael Kruse's avatar Michael Kruse
Browse files

[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
parent c7f4c333
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment