If the repetition count is a big number, constant-folding the expression can take a lot of memory. Since the compiler can't know (in general) if a statement is ever executed, it is conservative not to evaluate it at compile time
It could be an omission
It might be not common enough operation for the compiler writers to care about optimizing it.