SPRUIG8J January 2018 – March 2024
As stated above, the compiler must check for legality before attempting to coalesce the loop. If the compiler cannot guarantee that an inner loop is executed at least one time, then it will not coalesce the loop, even if you have disabled the profitability heuristic.
To inform the compiler that a loop will always be executed, use a
MUST_ITERATE
pragma just prior to the loop body:
#pragma MUST_ITERATE(1,65535,)
This pragma tells the compiler that the loop executes at least once and no more than 65,535 times.